I'm trying to minimize the size of a gif I'm making by adjusting the size property. While using the gr backend I get (one per frame) GKS: Rectangle definition is invalid in routine SET_VIEWPORT when trying to have a small slide size. I quickly found out that the spatial size of the resulting gif is 6 times larger than whatever I supply size with.
Consider this MWE:
using Plots
anim = Animation()
for i in 1:100
h = [plot(rand(10)) for i in 1:4]
plot(h..., size = (100,100))
frame(anim)
end
gif(anim, "a.gif", fps = 30)
This spits tons of GKS messages and results in a gif that is 600脳600 pixels large. Weird.
I'll just add that if we had just one plot instead of 4 subplots the GKS warnings disappear but the file is still 600脳600 pixels large...
So in reference to all the dpi issues, I found out that the magical dpi that makes gif sizes work in gr is (drum-roll) 50/3.
Most helpful comment
So in reference to all the dpi issues, I found out that the magical dpi that makes gif sizes work in
gris (drum-roll) 50/3.