相关疑难解决方法(0)

Plotly:如何去除 x 轴上的空白间隙

我已经在 plotly 上做了这个图

图表

我想删除空白,只显示有值的 x,并隐藏没有任何值的 x

我该怎么做?

这是我的代码:

go.Bar(name=i,x=listeDepartement,y=listePPA))
fig = go.Figure(data=bar)
fig.update_layout(barmode='stack')
fig.write_html('histogram.html',auto_open=True)
fig.show()
Run Code Online (Sandbox Code Playgroud)

python diagram axis plotly

2
推荐指数
1
解决办法
4575
查看次数

标签 统计

axis ×1

diagram ×1

plotly ×1

python ×1