How to rotate xticks in CairoMakie?

Hi,

I’m using CairoMakie and can’t find a way to rotate xticks 90° (from horizontal to vertical), already defined my own FIgure and Axis and trying to make a scatter plot.

f = Figure()

Axis(f[1,1], xticks = (1:31, df.date_created))

xs = 1:1:31
ys = df.mean
mksize = df.nrow

scatter!(xs, ys, markersize = mksize)

f

Thanks in advance for any help.

1 Like

How about

Axis(f[1,1], xticks = (1:31, df.date_created), xticklabelrotation=45.0)

The full list of attributes is here: https://makie.juliaplots.org/stable/makielayout/reference.html#Makie.MakieLayout.Axis

3 Likes

It worked!
Thank you

All rotations in Makie are radians, so the value you want is pi/2

3 Likes

updated link to docs found here: