我的问题是,当我用子地块创建多个绘图时,x_轴是共享的,x_轴上的后缀不会显示
我使用的代码是:
import plotly.graph_objects as go
fig = make_subplots(rows=2, cols=1, shared_xaxes=True, vertical_spacing=0.05)
fig.add_trace(
go.Bar(x=[1, 2, 3], y=[4, 5, 6]),
row=1, col=1
)
fig.add_trace(
go.Bar(x=[2, 3, 4], y=[5, 6, 7]),
row=2, col=1
)
fig.update_layout(height=600, width=800, title_text=“Subplots”, xaxis=dict(ticksuffix="%"))
fig.show()
有谁能帮忙,我做错了什么
提前谢谢
你的目标图是这样的吗
相关问题 更多 >
编程相关推荐