The sizes of the plot files generated by GR are sometimes ridiculously large. Changing dpi does not help significantly. After some experimenting, it seems it is caused by LaTeX text. For example

gr()

xi = 0:0.1:10

plot(xi,sin.(xi), xlabel=L"\sin\cos x_y", ylabel=L"\frac{42}{42}", label=L"\mathcal N")

savefig(“fig.pdf”)

generates plot which has 1.94 MB. I have checked this behaviour on 2 computers. It is also the same when not using LaTeXStrings, like

ylabel = “$\sin $”

Does anyone know how to fix this problem?