# Slightly weird LaTeX characters in Makie plots

**URL:** https://discourse.julialang.org/t/slightly-weird-latex-characters-in-makie-plots/81181
**Category:** Visualization
**Tags:** question, plotting, makie
**Created:** [May 17, 2022, 7:57am UTC](https://discourse.julialang.org/t/slightly-weird-latex-characters-in-makie-plots/81181 "2022-05-17T07:57:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![RayleighLord](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rayleighlord/32/33592_2.png) [@RayleighLord](https://discourse.julialang.org/u/RayleighLord)
#### Post date: [May 17, 2022, 7:57am UTC](https://discourse.julialang.org/t/slightly-weird-latex-characters-in-makie-plots/81181/1 "2022-05-17T07:57:27Z")

</div>

Hello,

I would like to point out a strange behaviour I started to notice when using LaTeX strings in Makie plots. This issue might seem subtle, and I do not know how easy a solution could be, but I think raising it is worthwile.

The problem when using LaTeX strings in Makie, in that some characters, like greek letters, appear slightly different as they would appear when you are making a regular LaTeX document. For example, the following code

```julia
using GLMakie, LaTeXStrings

begin
    x = 0:0.01:1
    fig = Figure(resolution = (640, 480))
    ax = Axis(fig[1, 1], xlabel = L"\omega \cos(\phi)", ylabel = L"y", ylabelsize = 22,
            xlabelsize = 22, xgridstyle = :dash, ygridstyle = :dash, xtickalign = 1,
            xticksize = 10, ytickalign = 1, yticksize = 10, xlabelpadding = -10)

    for i in 1:5
        lines!(ax, x, x .^ i, label = latexstring("x^{$(i)}"))
    end

    text!(L"\omega \cos(\phi)", position=Point2f(0.0, 0.75), textsize=40)

    axislegend(; nbanks = 3, framecolor = (:grey, 0.5))
    display(fig)
end

```

produces the figure  
 ![test](https://global.discourse-cdn.com/julialang/original/3X/d/6/d62240b1f8a3dbce0a1182238b402f9a125e252d.png)

However, characters like `ω` look slightly off as they would look in an standard LaTeX document. The powers of `x` in the legend are not looking good either. For instance, in a regular text, the string `\omega \cos(\phi)` is printed in as

 ![2](https://global.discourse-cdn.com/julialang/original/3X/8/c/8ccec72c64088417efcf0d9aa813336a8adaaeb7.png)

Given the little knowledge I have currently in Julia, I am not sure where is the root of the problem. I think this is a small subtlety but one that should be corrected in order to have accurate LaTeX characters in plots.
