2024-09-23 10:32:00 发布
网友
我有这段代码。我可以使用px.scatter编辑错误条的宽度吗
tab = pd.read_csv("hct.csv") fig=px.scatter(tab, x="diametro", y="prof", color="s-c", trendline="ols",error_y="erro prof",error_x="erro diam", width=600, height=400) fig.show()
您还没有指定宽度是否应该由一个数字变量设置,或者您只是想让每个错误条的行变宽一点。但实现后者的方法是,例如:
fig.data[0].error_y.thickness = 12
这将扭转这一局面:
为此:
不管你是用ploty.express还是plotly.graph_objects来塑造你的身材,这都无关紧要
ploty.express
plotly.graph_objects
您还没有指定宽度是否应该由一个数字变量设置,或者您只是想让每个错误条的行变宽一点。但实现后者的方法是,例如:
这将扭转这一局面:
为此:
不管你是用
ploty.express
还是plotly.graph_objects
来塑造你的身材,这都无关紧要完整代码:
相关问题 更多 >
编程相关推荐