How to bold plot labels in Pumas?

Hi - I was trying to use this code from the documentation (Plotting · Pumas):

figures =
    observations_vs_time(
        pkpain_nca;
        axis = (
            xlabel = "Time (hours)",
            ylabel = "CTMX Concentration (μg/mL)",
        ),
        paginate = true,
        facet = (combinelabels = true,),
    )

figures[1]

I would like to bold the xlabel and ylabel in this plot. Is there a fontface = "bold" equivalent option to do the same? Thanks!

Currently, Makie, the underlying plotting library, uses a “font-only” system. So there’s no “bold” flag or anything like that, because many font families have multiple bold fonts so it’s not clear which to use, etc. The bold font in Makie’s default theme is called TeX Gyre Heros Bold Makie and you can set xlabelfont = "TeX Gyre Heros Bold Makie" and so on.

2 Likes

Thanks for the response Julius.
I am an avid Pumas user and trying to teach Pumas to other peers and students. Can you (or anyone else) please help me on how I can get a new user to arrive to this answer by themselves?

1 Like

It’s not specifically mentioned anywhere in the docs I think, that’s a good point. There are just many examples in the wild where people have been changing fonts, but I can see how it would be confusing not to find the familiar bold/italic option for many users. I’m planning to overhaul the way to specify and change fonts in Makie a bit anyway, and I’ll keep this in mind when I write the new documentation.

We will also take note to mention this in Pumas docs separately.

1 Like

That sounds great. Thank you very much!