Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

[BUG]: Y-axis autorange stops working when updating the xaxes range for subplots with shared x-axes and y-axes

未關閉
#8,053 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@sap1110 已經在處理了。

開始於 2026年9月29日。

  • #8092 來自 @sap1110 —— 未關閉

評估

難度
3/5
預估耗時
1-2 天
新手友好度
68/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
javascript

研究方向

從提供的使用 shared_xaxes 和 shared_yaxes 的 make_subplots 重現開始,然後追蹤 plotly.js 中的 update_xaxes(range=(0, 100)) 進入點。比較 2×2 子圖情況與未共用兩個座標軸的情況下的 autorange 行為。完成的標準是:明確指定的 x 軸範圍不再重設 y 軸範圍,且該回歸問題已由測試涵蓋。

由索引模型根據 Issue 內容生成。

描述

bug P2 size: 1
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()
主要語言
JavaScript
星號
18.4k
分支
2k
平均合併
2 天 7 小時
30 天內合併 PR
18

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

plotly/plotly.js 的其他 Issue

查看 plotly/plotly.js 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。