# \[Makie\] Latex in tick labels

**URL:** https://discourse.julialang.org/t/makie-latex-in-tick-labels/86980
**Category:** Visualization
**Tags:** latex, makie
**Created:** [September 9, 2022, 11:06am UTC](https://discourse.julialang.org/t/makie-latex-in-tick-labels/86980 "2022-09-09T11:06:33Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![whatsthecraic](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@whatsthecraic](https://discourse.julialang.org/u/whatsthecraic)
#### Post date: [September 9, 2022, 11:06am UTC](https://discourse.julialang.org/t/makie-latex-in-tick-labels/86980/1 "2022-09-09T11:06:33Z")

</div>

How do you render a latex expression for the ticks in a Makie plot ?

Example:

```julia
ax = Axis(Figure()[1,1])
xlims!(ax, 1, nothing)
ax.xscale = log2
ax.xticks = ([1, 8, 32], [L"2^0", L"2^3", L"2^5"])
values = [1,2,3,4,5,6]
points = [1,2,4,8,16,32]
lines!(ax, points, values)
current_figure()

```

My output with CairoMakie is

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/1/d1a8c8be05ccc70aae2affb83c6193789d155bd0.png)

---

<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: [September 9, 2022, 11:22am UTC](https://discourse.julialang.org/t/makie-latex-in-tick-labels/86980/2 "2022-09-09T11:22:29Z")

</div>

Can you try passing the ticks to the `Axis` constructor directly? Seems like your labels were converted to normal Strings, that could happen if an internal container was typed `String` initially.

---

<div class="post-metadata">

### Author: ![whatsthecraic](https://avatars.discourse-cdn.com/v4/letter/w/7bcc69/32.png) [@whatsthecraic](https://discourse.julialang.org/u/whatsthecraic)
#### Post date: [September 9, 2022, 3:06pm UTC](https://discourse.julialang.org/t/makie-latex-in-tick-labels/86980/3 "2022-09-09T15:06:50Z")

</div>

This actually worked. Shall I file a bug ?

---

<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: [September 9, 2022, 4:15pm UTC](https://discourse.julialang.org/t/makie-latex-in-tick-labels/86980/4 "2022-09-09T16:15:06Z")

</div>

Yeah go ahead, this should work
