Python 有没有办法改变散点图上的原点轴(零线)?
有没有办法改变散点图上的轴?假设将轴从(0,0)即(零线)移动到类似(3,3)的位置,并制作一个象限图 我已经尝试将“xaxis”和“yaxis”上的“zeroline”值设置为False,然后从“shapes”在两个轴上绘制两条常量线。 但我想知道是否有办法改变原点轴 如果运行Python 有没有办法改变散点图上的原点轴(零线)?,python,plotly,plotly-python,Python,Plotly,Plotly Python,有没有办法改变散点图上的轴?假设将轴从(0,0)即(零线)移动到类似(3,3)的位置,并制作一个象限图 我已经尝试将“xaxis”和“yaxis”上的“zeroline”值设置为False,然后从“shapes”在两个轴上绘制两条常量线。 但我想知道是否有办法改变原点轴 如果运行help(图['layout']['xaxis'])您将看到zeroline的唯一选项是: zeroline Determines whether or not a line is drawn at alo
help(图['layout']['xaxis'])
您将看到zeroline
的唯一选项是:
zeroline
Determines whether or not a line is drawn at along the
0 value of this axis. If True, the zero line is drawn
on top of the grid lines.
zerolinecolor
Sets the line color of the zero line.
zerolinewidth
Sets the width (in px) of the zero line.
所以如果你的方法是
将“xaxis”和“yaxis”上的“零线”值设置为False,然后
然后从“形状”沿两个轴绘制两条恒定线
…对你来说是可行的,我真的认为这是你最好的选择。关于@vestland上面提到的“两条常数线”的例子;你也许愿意。
zeroline
Determines whether or not a line is drawn at along the
0 value of this axis. If True, the zero line is drawn
on top of the grid lines.
zerolinecolor
Sets the line color of the zero line.
zerolinewidth
Sets the width (in px) of the zero line.