Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zorder on overlaying axes #6943

Closed
wants to merge 6 commits into from
Closed

Zorder on overlaying axes #6943

wants to merge 6 commits into from

Conversation

Farkites
Copy link
Contributor

@Farkites Farkites commented Mar 27, 2024

🚧🚧🚧🚧🚧 WORK IN PROGRESS 🚧🚧🚧🚧

This solution splits all the traces with different zorder into auxiliary subplots, then sorts all the subplots by zorder, and sets the subplot with lowest zorder as the main plot and the rest as overlaying subplots.

For example:

Context:

  • There are 2 traces in the subplot xy with zorder=0 and zorder=10.
  • There is 1 trace in the subplot xy2 with zorder=5.
  • The y axis overlays the y2 axis.

This solution will:

  • Create an additional subplot xy-over-2 for the trace with zorder=10.
  • Set the subplot xy as the main plot instead of subplot xy2.
  • Set the subplot xy2 and subplot xy-over-2 to overlay subplot xy.

(Naming for the additional subplots '-over-' can be discussed)

@hannahker
Copy link
Contributor

@alexcjohnson @archmoj @emilykl this PR builds off of #6918 to support the z-index parameter for plots with multiple y-axes (ie. multiple subplots).

Do any of you have thoughts on this implementation approach? We're hesitant about introducing these kind of changes to a really high-traffic part of the codebase, but are struggling to come up with another implementation approach.

Base automatically changed from trace-zindex to master April 9, 2024 23:13
@Farkites Farkites changed the title Mult axis zindex Zorder on overlaying axes Apr 24, 2024
@archmoj archmoj marked this pull request as ready for review April 24, 2024 16:29
@archmoj archmoj requested a review from emilykl April 24, 2024 16:33
@Farkites Farkites requested a review from archmoj April 24, 2024 17:13
@archmoj archmoj closed this Jun 19, 2024
@archmoj archmoj deleted the mult-axis-zindex branch June 25, 2024 13:24
@archmoj archmoj added bug something broken feature something new labels Jul 4, 2024
@archmoj archmoj added this to the v2.34.0 milestone Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants