Plots / GR cutting off y axis labels / needs more padding

I’m plotting some data with StatsPlots and using savefig and winding up with something like this:

On the lower plot the y axis label is “Mbps” but it doesn’t show up because it’s “off the screen” can anyone tell me how to make this work?

@df dat plot(:times + :timens/1e9,:dlrate ./ 1000,title="Bandwidth Setting",label="Download Ra\
te (Mbps)",xlab="time (s)",ylab="Mbps",legend=:topright,xlim=xlimvals,ylim=(0,downmax/1000.0))
p2 = @df dat plot!(:times + :timens/1e9,:uprate ./ 1000,title="Bandwidth Setting",label="Uploa\
d Rate (Mbps)",xlab="time (s)",ylab="Mbps")

Please check if using Measures helps.

1 Like

This does seem to help, but how does it get its notion of 10mm on a png file? I assume there is some default “ppi” assumption?

I think you want left_margin=2Plots.mm.

IIRC the space between the “guide” string and the tick numbers was increased to stop things crashing, is now often too big… maybe that confused the margins.

5 Likes