plotly.js轴的“锚点"属性 [英] plotly.js axis 'anchor' attribute
问题描述
我正在尝试自定义一些子图,但是我不明白轴的锚定"属性的含义.
I'm trying to customize some subplots, but I don't understand what the axis 'anchor' attribute means.
使用此属性的一些示例在此处: https://plot.ly/javascript/subplots/. yaxis2: {anchor: 'x2'}
是什么意思? anchor=false
或anchor=free
是什么意思?我无法在在线文档中找到解释.
Some examples where this attribute is used are here: https://plot.ly/javascript/subplots/ . What does yaxis2: {anchor: 'x2'}
mean? What does anchor=false
, or anchor=free
mean? I haven't been able to find an explanation in the online docs.
推荐答案
To answer my own question, I found the documentation on the axis anchor
attribute here.
x轴可以锚定到y轴,例如xaxis2: {anchor: 'y2'}
表示xaxis2在原点加入yaxis2.如果anchor
设置为free
,则可以使用position属性将轴移动到另一个位置.
An x axis can be anchored to a y axis, for example xaxis2: {anchor: 'y2'}
means that xaxis2 joins yaxis2 at the origin. If anchor
is set to free
, the position attribute can then be used to move the axis at another position.
我不确定是否甚至可以设置anchor=false
,我看到在plotly.py API false
仅仅是python API内部使用的值.
I'm not sure whether setting anchor=false
is even possible, I saw that used in the make_subplots
function of the plotly.py API here, but it may be that false
is just a value used by the python API internally.
这篇关于plotly.js轴的“锚点"属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!