我正在尝试在作为子图显示的四个甘特图中的x-轴
和y-轴
上添加相同的标题。 我在网上找到了figs.update_layout()
,但这只在第一个图表上显示标题,而不是所有图表。我在R中找到了一些答案,但希望能提供Python方面的帮助。
figs = make_subplots(
rows=2, cols=2,
shared_xaxes=False,
subplot_titles =('Plot 1', 'PLot 2', 'PLot 3', 'Plot 4')
)
figs.update_layout(
title="Plot Title",
xaxis_title="Miliseconds",
yaxis_title="Services",
)
for trace in fig_operable.data:
figs.add_trace(trace, row=1, col=1)
for trace in fig_dynamic.data:
figs.add_trace(trace, row=2, col=1)
for trace in fig_early.data:
figs.add_trace(trace, row=1, col=2)
for trace in fig_hmi.data:
figs.add_trace(trace, row=2, col=2)
figs.update_layout(showlegend=False, title_text="Title of charts")
figs.show()