In Plots.jl, how does one control the space between ylabel and yaxis?


I don’t seem to find any example or documentation about this.


I am answering my own question. I found that the option “left_margin = 8mm” works.

#3 and (in a julia session with Plots loaded) plotattr(:Subplot) (or :Plot, :Axis, :Series) are your friends.


Thank you for this link - very helpful! :slight_smile:


Thank you.


@mkborregaard is there a page in the docs with tricks like this? They are extremely useful!

In the other post, you gave us the means to explore colorschemes of all kinds, now I learned how to find attributes in the Julia prompt, that is amazing! This should be at the top of the docs somewhere.


E.g. the very top shiny blue box on this page :slight_smile:

But agreed, some things in the docs (e.g. also the description of legends) could be improved. We often try to solicit PRs to the docs, as the readers of those are really the experts.


I found out that it is not working any more. I got the error message “mm not defined”. None of other units (px, in, etc) seems to work either. I am using Plots.jl v0.13.1 and RecipesBase 0.2.3. Does anyone know if the syntax has changed?


It has, as we had too many namespace clashes. using Plots.PlotMeasures will resurrect the functionality.


Thank you. That’s what I needed to know.


Another question. Is there a way to control the spacing between tick values and the axis?


I found that this doesn’t move change the distance between axes and label, instead it moves the adjacent plots, making a bad use of space. I’m using plotly, by the way. Does any one have any suggestion to achieve the change?