See https://github.com/plotly/plotly.py/blob/master/plotly/tools.py#L1336. Large font leads to overcrowding when plotting multiple subplots with titles.
It would be better to have make_subplots accept a kwargs parameter like font_size=8 or, more general, to have a kwargs parameter like font=graph_objs.Font(size=8, color=...)
Seconded.
I guess you are talking about font size of subplot tiles?
You guys probably already know how to update the fonts of subplots created by make_subplots,
but it isn't probably the best convenient way like your suggestions, i might guess.
and i also guess i might use the spacing option and margin to adjust the spaces.
it looks like changing the fonts does not change the spacing??
For now, i hope this example meets your expectation,
though it will force you to have the same font for all subplot titles...
fig = tools.make_subplots(rows=3, cols=2,
subplot_titles=('trace1','trace2','trace3','trace4','trace5','trace6'))
fig.append_trace(trace1, 1, 1)
fig.append_trace(trace2, 2, 1)
fig.append_trace(trace3, 3, 1)
fig.append_trace(trace4, 1, 2)
fig.append_trace(trace5, 2, 2)
fig.append_trace(trace6, 3, 2)
for i in fig['layout']['annotations']:
i['font'] = dict(size=10,color='#ff0000')
You guys probably already know how to update the fonts of subplots created by make_subplots
I had no idea. Tried googling for 'plotly subplot title font size' etc. but could not find a solution. I guess the key point here is that subplot titles are annotations.
for i in fig['layout']['annotations']:
i['font'] = dict(size=10,color='#ff0000')
Yep, that works. Of course one can simply write i['font']['size'] = 10. Maybe this should be in the example gallery?
Same, I didn't realize that subplot titles are annotations.
While it would still be nice to pass this in as a param to make_subplots() during initialization, this solves the problem for now, so I'll close. Thanks!
Most helpful comment
I guess you are talking about font size of subplot tiles?
You guys probably already know how to update the fonts of subplots created by make_subplots,
but it isn't probably the best convenient way like your suggestions, i might guess.
and i also guess i might use the spacing option and margin to adjust the spaces.
it looks like changing the fonts does not change the spacing??
For now, i hope this example meets your expectation,
though it will force you to have the same font for all subplot titles...