julia savefig() saves wrong marker shape

287 views Asked by At

The code is to using PyPlot to scatter and save in julia.

using PyPlot;pygui(true)

fig = figure()
for i = 1:400

    scatter([i,i+1], [i+1, i+2], color = "blue", s = 0.1)
end
PyPlot.savefig("1.png", figsize = (16, 9),dpi = 1200, bbox_inches="tight")

But the plot result and saved figure is different: What I want is some simple dots: enter image description here

But in saved figure the marker shape is circles : enter image description here

As you can see, the marker type is changed. I found this only occurs when scattering highly dense dots. How should I fix this?

1

There are 1 answers

0
Ragnar On

I just had the exact same problem. The only way I figured out was to set markeredgecolor="none", that got rid of the circles around the dots. Might not be the most efficient solution, but at least I could produce the plots I needed.