Why is the font size in a figure incorrect? | styling a figure | corporate design

Many of us have to write reports or make presentations with visualizations. The challenge sometimes isn’t the underlying data or the visualization itself, but the corporate design. In my case, the corporate design of the organization is based on an excel template for diagrams, with all its disadvantages. My goal is to automate most of it with plotly and convince my academic organization to move to plotly to a certain extent. I simply love plotly and its capabilities!

Therefore I would like to share things I couldn’t find elsewhere and others also might search for in future. Or simply raise questions :slight_smile:

Why is the size of my font incorrect?
Maybe I’m missing something here, but if I set the figure-wide font side, I kind of expect that the font size is configured accordingly. But if I double-check the rendered pdf-figure with the program “Adobe Pro” it doesn’t fit at all. (I added the actual measured font size in green).

Even though when I update every single font size separately it doesn’t fit exactly…

I would highly appreciate any help!

df = px.data.tips()

fig = px.box(df, x="time", y="total_bill", title = 'Title')


The global font size is used as a base size and then other font sizes are computed as a multiple thereof.