fig.update_layout(xaxis_type="category") breaks make_subplots(shared_xaxes=True)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
This one is pretty simple to explain and see. Create a subplot with two or more plots that are using the same x-axis data, enable shared_xaxes=True, plot it, and it works as intended; zooming in on one plot zooms in on both plots.
When updating the layout to xaxis_type="category", for categorical data, even when both both subplots have the same x-axis data and shared_xaxes=True is set to true, it no longer works; the axis are no longer shared. Zooming in on one plot no longer effects the other plot.
Tested on: plotly 5.24.1, python 3.13
Contributor guide
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.
Research direction
Start by reproducing the reported subplot case with make_subplots(shared_xaxes=True), categorical x-axis data, and xaxis_type="category". Compare zoom behavior before and after the layout update; done means zooming one subplot also zooms the other when the x-axis data is shared.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100