在 Plotly 中使用 rangeslider 时自动缩放 y 轴

Autoscaling the y axis when using rangeslider in Plotly

我正在关注 Plotly 网站上的 rangeslider 示例:https://plot.ly/python/range-slider/

有没有办法随着 x 范围的变化自动(甚至手动)重新缩放 y 轴?例如,如果上例中的日期范围设置在 2008 年 11 月至 2009 年 4 月之间,我们如何自动将 y 轴重新缩放到更合适的范围以更好地查看数据中的特征?

根据this answer from the devs,答案是否定的:

Not at the moment, unfortunately.

现在是 2018 年,我也很难找到一个简洁的解决方案,但这里有一个使用 FigureWidget 在 plotly 社区网站上发布的潜在解决方法:

https://community.plot.ly/t/y-axis-autoscaling-with-x-range-sliders/10245/3