I’m plotting something with
aspect_ratio=1 (GR backend) and the resulting file (via
savefig) has a lot of “air” surrounding the plot. I want to make it a bit more tight.
using Plots plot(rand(10), aspect_ratio = 1) savefig("a.png")
and I want something similar to this:
One idea is to control the
size of the plot to fit the
w = 100 plot(rand(10), aspect_ratio = 1, size = (10w,1w))
which indeed results in this:
But because the plots in question include many different sources of data it’s not very trivial to know what the ranges of the axes are. It would therefore be easier to access the
ylims of the plot…
Any idea how I can do that?