# How to rotate xticks in CairoMakie?

**URL:** <https://discourse.julialang.org/t/how-to-rotate-xticks-in-cairomakie/63120>\
**Category:** New to Julia\
**Tags:** question, plotting, makie\
**Created:** [June 17, 2021, 11:09pm UTC](https://discourse.julialang.org/t/how-to-rotate-xticks-in-cairomakie/63120 "2021-06-17T23:09:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheRoniOne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/theronione/32/17359_2.png) [@TheRoniOne](https://discourse.julialang.org/u/TheRoniOne)\
**Post date:** [June 17, 2021, 11:09pm UTC](https://discourse.julialang.org/t/how-to-rotate-xticks-in-cairomakie/63120/1 "2021-06-17T23:09:34Z")

</div>

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.

```julia
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.

---

<div class="post-metadata">

**Author:** ![contradict](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@contradict](https://discourse.julialang.org/u/contradict)\
**Post date:** [June 17, 2021, 11:53pm UTC](https://discourse.julialang.org/t/how-to-rotate-xticks-in-cairomakie/63120/2 "2021-06-17T23:53:05Z")

</div>

How about

```julia
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](https://makie.juliaplots.org/stable/makielayout/reference.html#Makie.MakieLayout.Axis)

---

<div class="post-metadata">

**Author:** ![TheRoniOne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/theronione/32/17359_2.png) [@TheRoniOne](https://discourse.julialang.org/u/TheRoniOne)\
**Post date:** [June 18, 2021, 12:11am UTC](https://discourse.julialang.org/t/how-to-rotate-xticks-in-cairomakie/63120/3 "2021-06-18T00:11:54Z")

</div>

It worked!  
Thank you

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [June 18, 2021, 5:09am UTC](https://discourse.julialang.org/t/how-to-rotate-xticks-in-cairomakie/63120/4 "2021-06-18T05:09:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![alex-s-gardner](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alex-s-gardner/32/30210_2.png) [@alex-s-gardner](https://discourse.julialang.org/u/alex-s-gardner)\
**Post date:** [August 16, 2024, 9:42pm UTC](https://discourse.julialang.org/t/how-to-rotate-xticks-in-cairomakie/63120/5 "2024-08-16T21:42:55Z")

</div>

updated link to docs found here:

> **[Axis | Makie](https://docs.makie.org/v0.21/reference/blocks/axis#xticklabelrotation)**
>
> Create impressive data visualizations with Makie, the plotting ecosystem for the Julia language. Build aesthetic plots with beautiful customizable themes, control every last detail of publication quality vector graphics, assemble complex layouts and...
