Skip to content

WIP: Adjust nticks based on length of axis#5494

Closed
mdboom wants to merge 4 commits intomatplotlib:masterfrom
mdboom:dynamic-ticking
Closed

WIP: Adjust nticks based on length of axis#5494
mdboom wants to merge 4 commits intomatplotlib:masterfrom
mdboom:dynamic-ticking

Conversation

@mdboom
Copy link
Copy Markdown
Member

@mdboom mdboom commented Nov 16, 2015

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.

@mdboom mdboom added this to the next major release (2.0) milestone Nov 16, 2015
@Tillsten
Copy link
Copy Markdown
Contributor

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.

@mdboom
Copy link
Copy Markdown
Member Author

mdboom commented Nov 18, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants