-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
axis automargin moves axis label outside of individual tick labels, not the longest tick label #2575
Comments
Thanks @yniknafs - can you work this plot into a codepen/jsfiddle so we can debug? |
Made a codepen showing the behavior. |
Honestly, I think this behavior could work if it wasn't so close to the tick labels. A short term fix may be to just add a bigger buffer? the way it is now, the label can sort of get lose in the tick labels. A few extra pixels could go a long way. |
Thanks @yniknafs for the codepen 🎉 @nicolaskruchten I thought in my fiddling yesterday it looked like in cases like this we were pushing the x title down below all the tick labels... but here we are automatically adjusting the margins but the title just avoids the nearby labels... even if I shorten the really long labels. So let me toss this back to you, is this a bug or is this how the feature was intended to work so this is a feature request? @yniknafs totally agreed that the title/label padding would be nice as an adjustable parameter. |
Let me dig into this today, this behaviour does seem at odds with the intended behaviour. |
So the current behaviour surprised me, but is actually not a bug: the So this is not a bug but a reasonable feature request: to be able to control the positioning of the axis title with respect to the labels above it :) |
@nicolaskruchten Thanks for the response. I agree - the auto margin is technically doing what it should do. In practice, I think the current functionality could result in a plots that don't look quite right. See image below. I'm kind of stuck between a rock and a hard place with this. Not sure what I can do to make it look right. May have to add my own custom annotation, which isn't pleasant for a dynamic plot that can have different labels / different numbers of bars, etc. |
Hi - this issue has been sitting for a while, so as part of our effort to tidy up our public repositories I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our stack. Cheers - @gvwilson |
see #2243
Using
automargin: true
moves axis label outside of tick labels, but only to the tick labels near the axis label, not below the longest tick label.e.g.,
The text was updated successfully, but these errors were encountered: