Save figure in eps or pdf using Plots pyplot() or gr()

I am trying to save a plot with scatter,marketcolors, etc etc… in either pdf or eps, but I can only save in png.

If the extension is pdf or eps the code crashes with pyplot() or it fails at plotting the minus sign in front of negative numbers in eps().

Thanks

The code I run (or with gr()) is

using Plots
pyplot()
plot(x,y)
savefig("Figure.pdf")

Hi, maybe you should share your error and stacktrace because your code seems fine, assuming x and y are arrays and that you installed the PyPlot package.