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

inside ticks with dual y-axes #5402

Closed
nicolaskruchten opened this issue Jan 14, 2021 · 2 comments
Closed

inside ticks with dual y-axes #5402

nicolaskruchten opened this issue Jan 14, 2021 · 2 comments
Labels
bug something broken

Comments

@nicolaskruchten
Copy link
Contributor

In this pen https://codepen.io/nicolaskruchten/pen/QWKJamw the range on the left side should make room for the y2 tick labels. I'm not sure what the general principle is here... is it because y2 is anchored to x or just because there exists a trace on x, y2? @alexcjohnson if you have any insight into a general rule here, I'd appreciate any thoughts.

@nicolaskruchten nicolaskruchten added sponsored bug something broken labels Jan 14, 2021
@alexcjohnson
Copy link
Collaborator

Nice find. Certainly this depends on y2 being anchored to either x or another axis that overlays x. I don't think it matters what traces exist, we want everything in that subplot to avoid overlapping these labels.

So I guess the rule is: a set of y axis inside tick labels should contribute to the autorange for the x axis it's anchored to and any other x axis grouped with it via overlaying.

For example, suppose we have x, x2, and x3, the latter two both overlaying: 'x', and we have y2 anchored to x2. We need to figure out that all three of these x axes should leave space for the y2 labels in their autorange, even though that requires following the overlaying chain downstream from x2 to x and then back upstream from x to x3.

@nicolaskruchten
Copy link
Contributor Author

For future reference, there are cases with more than two Y axes that are possible, for example a two-subplot case, vertically offset, where the X axis range is shared, so you have y1/y2 anchored to x1 and y3/y4 anchored to x2 and x2 overlaying x1.

Presumably we want this to work with matches also, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

2 participants