Y-axis autoscaling with x-range sliders in plotly(带有 x 范围滑块的 Y 轴自动缩放)
问题描述
Afaik,使用 x 范围滑块时,y 轴无法自动缩放.Y 范围是相对于整个 x 范围的 y 值选择的,并且在放大后不会改变.这对于波动时期的烛台图尤其烦人.当您使用 x-range 滑块放大时,您基本上会得到扁平的烛台,因为它们的波动只覆盖了初始范围的很小一部分.在做了一些研究之后,这里似乎取得了一些进展:https://github.com/plotly/plotly.js/pull/2364.任何人都知道 plotly.py 是否有可行的解决方案?感谢您的宝贵时间.
Afaik, y-axis cant be made to auto scale when using x-range sliders. Y range is chosen with respect to the y values of the whole x range and does not change after zooming-in. This is especially annoying with candlestick charts in volatile periods. When you zoom-in using x-range slider, you essentially get flat candlesticks as their fluctuations only cover a very small part of the initial range. After doing some research it seems that some progress has been made here: https://github.com/plotly/plotly.js/pull/2364. Anyone knows if there is a working solution for plotly.py ? Thanks for your time.
推荐答案
如果有帮助,我在 yaxis 上使用 fixedrange = False,以便能够手动缩放并将窗口调整到合适的 y 范围:
If it can help, I am using fixedrange = False on yaxis, to be able to zoom manually and adapt the window to the suited y range:
yaxis = dict(
fixedrange = False
)
这篇关于带有 x 范围滑块的 Y 轴自动缩放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:带有 x 范围滑块的 Y 轴自动缩放


- 我如何透明地重定向一个Python导入? 2022-01-01
- ";find_element_by_name(';name';)";和&QOOT;FIND_ELEMENT(BY NAME,';NAME';)";之间有什么区别? 2022-01-01
- CTR 中的 AES 如何用于 Python 和 PyCrypto? 2022-01-01
- 使用 Cython 将 Python 链接到共享库 2022-01-01
- 如何使用PYSPARK从Spark获得批次行 2022-01-01
- 检查具有纬度和经度的地理点是否在 shapefile 中 2022-01-01
- 我如何卸载 PyTorch? 2022-01-01
- 使用公司代理使Python3.x Slack(松弛客户端) 2022-01-01
- 计算测试数量的Python单元测试 2022-01-01
- YouTube API v3 返回截断的观看记录 2022-01-01