[BUG]: Y-axis autorange stops working when updating the xaxes range for subplots with shared x-axes and y-axes
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- data-visualization
Research direction
Start with the provided make_subplots reproduction using shared_xaxes and shared_yaxes, then trace the update_xaxes(range=(0, 100)) entry point in plotly.js. Compare autorange behavior for the 2×2 subplot case with cases that do not share both axes. Done means the explicit x-axis range no longer resets the y-axis ranges and the regression is covered by a test.
Written by the indexing model from the issue text.
Description
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()
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 21
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.js
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
chore P3 plotly-internal size: 3 task
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
chore P1 plotly-internal size: 1 task
Difficulty 1/5 Under an hour Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
chore P3 plotly-internal size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
plotly/plotly.js#7648 · 3 comments ·
Maintainers usually reply within 1 day
All issues in plotly/plotly.js
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
parse-community/parse-server#10699 · 1 comment ·
Maintainers usually reply within 1 day
-
area: dashboard bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Nitjsefnie-Harness-Commons/daedalus#1179 ·
Maintainers usually reply within 1 day
-
Aframe enhancement javascript
Difficulty 1/5 Under an hour Newbie friendliness 92/100
webarkit/Aframe-nft#17 ·
-
spec-feedback
Difficulty 2/5 1-3 hours Newbie friendliness 75/100