@sswatson Thank you for the help.
It seems to work for .png
but not for .pdf
.
I tried the following code and got nice png and black background pdf.
using Plots
p=plot([1,2,3], background_color=:transparent, foreground_color=:black)
savefig(p, "test.png") # work nicely
savefig(p, "test.pdf") # not work