Makie - How to pad data inside an axis?

I currently have the following

image

and I would like to put a bit more space above the curves (generated with density for the second and third). How can I achieve that?

If I could access the current xlims or ylims I could manually set it, but I didn’t manage to find where it is stored.

Also I don’t know the range of the curve itself for the plots generated with the density function.

Limits are stored together in an Axis, but there should be xlims! and ylims! functions to adjust them individually. See Axis · Makie Plotting Ecosystem

You can also change the autolimit margins, which govern how much additional space the axis uses when determining autolimits!. I think that’s xautolimitmargin = (0.2, 0.2) and the y equivalent, you can also theme that beforehand for all axes

1 Like