plotly / plotly/plotly.py

update_yaxes behavior for make_subplots vs specifying axes directly

Open
#5,213 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature P2
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

--copied from the plotly forum here https://community.plotly.com/t/update-yaxes-behavior-when-using-make-subplots-vs-specifying-axes-directly/92496--

To my knowledge, there’s two main ways to create subplots:

make_subplots(), then add trace data - example here
create list of data, inject into go.Figure() - example here (see hover on subplots)

I’m not sure which one’s the preferred one, but update_yaxes affects them differently.

If we use method 1, the update_yaxes affects all yaxes as intended
If we use method 2, the update_yaxes only affects the first subplot

Is there a reason why update_yaxes doesn’t play well with the second way of creating subplots?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the two linked examples in the issue and reproduce the differing update_yaxes behavior using make_subplots() and a manually assembled go.Figure(). Trace how subplot axes are referenced in each case. Done means the discrepancy is resolved or its intended behavior is clearly documented with a regression example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.