Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
WIP: Adjust nticks based on length of axis#5494
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Very nice to see some work on this, adjusting ticks always takes quite a lot of time. Feature request: ability to disallow ticks near the end of an axis, this is very helpful when stacking axes without any hspace/wspace, because else the ticklabels are overlapping. |
I'm going to close this and move it to the style-change branch. It's not possible to make this backward compatible without some other changes over there. |
There's a bit of a chicken and egg problem here. You don't know how many ticks you can fit if you don't know what the tick labels contain. And you don't know what the tick labels contain until you know how many ticks there are.
Therefore this is just based on a heuristic that the text will have an aspect ratio of around 4:1. Probably not always true, and there are perhaps better ways to estimate based on what the tick formatter actually is, or by rendering just one of them and using that.