Set axis-label size in Makie

How does one set the size of the xlabel and ylabel in Makie? That is, change the font-size that makes up the label.

Can a size be set globally, or would one have to do it for each plot?

1 Like

Found it! An Axis has a field called attributes, in which I found xlabelsize => 16.0. This can be set either by
plot(xvalues, yvalues, axis=(xlabelsize=20))
or by having an Axis object ax, and setting the value by ax.xlabelsize=20.

On doing it globally, it is explained in Theming · Makie Plotting Ecosystem (juliaplots.org). MWE, copied from the documentation:

fontsize_theme = Theme(fontsize = 20)
set_theme!(fontsize_theme)
2 Likes