[BUG]: Y-axis autorange stops working when updating the xaxes range for subplots with shared x-axes and y-axes
オープン
まだ誰も着手していません。
bug
P2
size: 1
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 12時間
- マージ済み PR(30日)
- 28
説明
Description
Making a subplot figure with shared_xaxes = True, shared_yaxes=True and updating the figure to with an explicit xaxis_range resets the y-axes ranges to (-1, 4).
- This only happens of both the x-axes and y-axes are shared, and only when updating the x-axes range.
- It only happens if you actually have more than one row, and more than one column in the figure.
- Tried with numpy inputs and plain python lists - same result.
Steps to reproduce
import numpy as np
import plotly.graph_objects as go
from plotly.subplots import make_subplots
fig = make_subplots(rows=2, cols=2, shared_xaxes=True, shared_yaxes=True)
x = np.linspace(0, 100, 200)
y = 10 * x
fig.add_scatter(x=x, y=y, row=1, col=1)
fig.add_scatter(x=x, y=y, row=1, col=2)
fig.add_scatter(x=x, y=y, row=2, col=1)
fig.add_scatter(x=x, y=y, row=2, col=2)
fig.update_xaxes(range=(0, 100))
fig.show()
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
shared_xaxes と shared_yaxes を使用した、提供されている make_subplots の再現コードから始め、plotly.js 内の update_xaxes(range=(0, 100)) のエントリーポイントを追跡します。2×2 サブプロットの場合と、両方の軸を共有しない場合について autorange の動作を比較します。明示的な x 軸の範囲によって y 軸の範囲がリセットされなくなり、その回帰がテストでカバーされれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100