Hi, everyone! I wonder how do you control the font size of a figure that is used in an academic publication, for example, if we plot the figure with Makie and write a paper with LaTex?
Usually, we can tune in Julia both the size of a figure and the font size in it, and in LaTex we can also tune the size of the inserted figure using e.g., \includegraphics[width=0.6\textwidth]{figure.pdf}. So there seems to be so much freedom here that it’s hard to control the exact size of the final font, so I have to draw and render repeatedly to achieve an imprecise subjective trade-off, rather than having a uniform font size for all figures in one paper. I guess that’s hardly the right way to do this. So I would like to consult the experienced seniors here, is there a better standardized practice?
This might not suit everyone, but for optimal control and perfect integration of figures in LaTeX documents, you cannot beat pgfplotsx.jl. It actually generates LaTeX code, so that the figure is compiled and generated by TeX/LaTeX itself.
Just as an example. Makie.jl only supports Computer Modern, the default LaTeX font (as far as I can tell), while with PgfPlotsX.jl the figure font will match the font of your document, or in fact use any other typeface/size/weight that LaTeX itself supports. If you use Computer Modern in your document, it might not be a big deal, but if you don’t it’s a big advantage.
Another cool thing, is that if you resize your figure (e.g. by changing the value in \includegraphics[width=0.6\textwidth]), the fonts are not affected.
Thanks for the correction. I tried to verify my claim, and found several places saying only Computer Modern was supported, but those must be out of date.