You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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=...)
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')
Reacted by Nicola, Marcus Herrmann, Lukas, Benjamin Baron, J Taery Kim, Bhishan Poudel, KorkaDiallo and Jan Święcki
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?
Reacted by Marcel Flygare, Amir and Ethan Severson
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!
Activity
jjnurminen commentedon Apr 27, 2018
Seconded.
rysktky commentedon May 20, 2018
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...
jjnurminen commentedon May 21, 2018
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.
Yep, that works. Of course one can simply write
i['font']['size'] = 10. Maybe this should be in the example gallery?jisaacso commentedon May 22, 2018
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!