Makie: Fontsizes for Publications

Hey out there!

I want to use CairoMakie.jl for my figures in a scientific work. The fontsize of the figure should match the fontsize of the text (12).
I have found a reference on the Makie site discussion this issue. (here)

However if I do it like this it does not work for me.
Here is what I do.

    using CairoMakie
    set_theme!(theme_latexfonts(), fontsize=12)
    width = 6 # in cm
    height = 6
    size = 28.3465 .* (width, height)
    fig = Figure(size=size)
    ax = Axis(fig[1, 1], xlabel="foo", ylabel="bar")
    scatter!(rand(10), rand(10))
    save("6x6.pdf", fig; pt_per_unit=1)

If I integrate the pdf in a latex document it looks like this.


As you can see the bigger one matches the fontsize of the latex document quite well, however the fontsize on the smaller one is way to big.

What am I missing or doing wrong?

Thanks for the help!

1 Like

There is a second discussion going on here:

In case you missed it and they missed your request.

Show you latex code please. I suspect you rescale the figure in there.

Oh yeah did see that, thank you!

Yeah, my mistake, i didnt see, i rescaled it in latex. My bad! Sorry for that!