[英]How do I remove gridlines in plotly express graph objects (python)
I tried many methods to remove the grid but I am unable to remove these gridlines, any help is appreciated.我尝试了很多方法来删除网格,但我无法删除这些网格线,感谢任何帮助。
fig = go.Figure()
for i in dfs:
k = 2
for j in selection:
fig = fig.add_trace(go.Scatter(x = dfs[i]["Date Time"], y = dfs[i][j], name = "{a} : {b}".format(a=i, b=j), yaxis="y{k}".format(k=k)))
k+=1
st.plotly_chart(fig, True)
try adding these two settings:尝试添加这两个设置:
fig.update_xaxes(showgrid=False)
fig.update_yaxes(showgrid=False)
That should get rid of the grid lines那应该摆脱网格线
This is an overkill,这是矫枉过正,
but try fig.update_layout(template='simple_white')
但尝试
fig.update_layout(template='simple_white')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.