Different Results When Saving Plots as png or pdf

I try to save my plots as pdf files for a publication.
Before I used the png file format and everything worked as expected, as seen in the first figure. But when I use the same code and save my plots as a pdf or svg, for example the markerstrokewidth=0 is ignored as can be seen in the second figure. What can I do to fix this?
Thanks in advance!

using Plots
plt = plot(rand(10), seriestype=:scatter, markerstrokewidth=0)
savefig(plt, "my_plot.pdf")
savefig(plt, "my_plot.png")

my_plot

There is an open issue with some workaround proposals:
https://github.com/JuliaPlots/Plots.jl/issues/2494
I didn’t check but perhaps there is something which helps.

2 Likes

Thanks I was able to use the workarounds to fix my problems :slight_smile:

1 Like