Problem using margin on plots

Hey everyone,

I have the following problem. I want to plot something and use the Unicode symbol for beta as xlabel. However, it gets cut off like this:

using Plots; pyplot();


It seems to me, that I should adjust the bottom margin like this:

using Plots; pyplot();
plot(rand(10), bottom_margin = 10mm)

like in the documentation here:

This gives me however the following error:

<strong>UndefVarError: mm not defined</strong>

in top-level scope at [base\none](#)

Does anybody know what to do?

Thanks a lot!


I have ran into this problem before! There is some package or something you have to enable to be able to use the mm notation. I will try to remember what it is (although someone might beat me to the punch).

Found it. Add using Plots.PlotMeasures and the mm notation should work.


Thanks, that got rid of the error message, but didn’t solve my problem. Now there is more space below the beta, but its top is still cut off. :confused:

Hmm, this seems to be particular to the PyPlot backend. Other backends increase the margin between the label and axis but PyPlot pads below the label instead. If you try another backend (GR, Plotly, etc.) you can do what you want.

FYI, how about trying


befor plot()?