plotly.js轴的“锚点"属性 [英] plotly.js axis 'anchor' attribute

查看:162
本文介绍了plotly.js轴的“锚点"属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试自定义一些子图,但是我不明白轴的锚定"属性的含义.

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=falseanchor=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.

推荐答案

要回答我自己的问题,我找到了anchor轴属性文档

To answer my own question, I found the documentation on the axis anchorattribute 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 anchoris set to free, the position attribute can then be used to move the axis at another position.

我不确定是否甚至可以设置anchor=false,我看到在plotly.py API make_subplots函数中使用了该功能. py/blob/892d0c804d5adc3f27a2e79983cd495a6f132ede/plotly/tools.py"rel =" noreferrer>此处,但是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 falseis just a value used by the python API internally.

这篇关于plotly.js轴的“锚点"属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆