Adjust number of ticks based on length of axis#5588
Adjust number of ticks based on length of axis#5588efiring merged 13 commits intomatplotlib:masterfrom
Conversation
lib/matplotlib/ticker.py
Outdated
There was a problem hiding this comment.
need to over-ride set_params and black-list nbins there as well.
|
|
You mean, raise an exception if it's there? |
|
Yes On Tue, Dec 1, 2015 at 6:22 PM Michael Droettboom [email protected]
|
|
Done. |
|
Does this mean that the default will now always be AutoLocator? And that a user will no longer be able to use |
|
@efiring: That's a good point. I've simplified this so that |
|
It might be better to use the string 'auto' as the default? It is clearer On Wed, Dec 2, 2015, 07:54 Michael Droettboom [email protected]
|
Sure. |
|
Right, "auto" is better for meaning automatic, meanwhile, None can continue On Wed, Dec 2, 2015 at 8:24 AM, Michael Droettboom <[email protected]
|
|
Good. Now, I am wondering whether there is any point in making the additional |
|
fed1ae3 to
0920ddc
Compare
|
Just rebased. I think this is good-to-go once Travis passes. |
0920ddc to
b4aa340
Compare
|
And... it's green (on Travis) |
Adjust number of ticks based on length of axis
|
@mdboom, I suspect some corner cases will turn up and tweaks might be needed, but I think it makes sense to merge this so that it will get more exercise. |
|
Agreed. Thanks. |
|
This was merged to master, but the merge is in the v2.0.x branch. I think something fishy went on around b7c7c5e but I am not sure. |
Adjust number of ticks based on length of axis
|
backported as 7488da6 |
|
@mdboom, I finally took a look to see what this does on master, with a minimal plot |
|
@efiring: You're suggesting a hard maximum? Just adding more space is unlikely to be a good fix, since in cases with many small axes you do want to allow the ticks to get reasonably close together. |
|
Yes, a hard maximum is what I had in mind. Then the behavior would not change for the default single-axes-per-figure case, but the multiple axes case would still be supported. |
|
Of course that hard maximum could be controllable with yet another rcParam if necessary. We didn't have one for that before, though. |
|
I'm fine with just setting the max to the old hard-coded value (which appears to be 9) and we can always add an rcParam later if people want more control. |
Follow on to #5494.