# How do you control the font size of a figure that is used in an academic publication?

**URL:** <https://discourse.julialang.org/t/how-do-you-control-the-font-size-of-a-figure-that-is-used-in-an-academic-publication/117713>\
**Category:** Visualization\
**Tags:** question, latex, makie\
**Created:** [August 1, 2024, 3:33am UTC](https://discourse.julialang.org/t/how-do-you-control-the-font-size-of-a-figure-that-is-used-in-an-academic-publication/117713 "2024-08-01T03:33:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [August 1, 2024, 5:43am UTC](https://discourse.julialang.org/t/how-do-you-control-the-font-size-of-a-figure-that-is-used-in-an-academic-publication/117713/2 "2024-08-01T05:43:28Z")

</div>

With Makie this is rather easy. There was just a thread the other day:

> [@Figure and font size when using \`Plots\`](https://discourse.julialang.org/t/figure-and-font-size-when-using-plots/117611/8):
>
> Ah, my mistake was using pt\_per\_unit in the wrong place… it should be used when saving the PDF. So it was using the default value (0.75). I can also use one of the default themes instead of specifying the font myself. Here is the solution that works. using CairoMakie x = 0:0.01:2π y = cos.(x); pt\_per\_unit = 1 figsizeinches(width, height) = (width, height) .\* (72/pt\_per\_unit) height = 2.5 # inches width = 4.5 # inches fontsize = 10 set\_theme!(theme\_latexfonts(); fontsize) f = Figure(; size…

It is also explained in the documentation:

> **[Figures | Makie](https://docs.makie.org/stable/explanations/figure#Matching-figure-and-font-sizes-to-documents)**
>
> 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...

The only thing missing is that you need to set pt\_per\_unit when _saving_ and not upon creation of the `Figure`.

---

_[View the full topic](https://discourse.julialang.org/t/how-do-you-control-the-font-size-of-a-figure-that-is-used-in-an-academic-publication/117713)._
