Skip to content

FIX: minimum number of bins in 'auto' is 3 #6470

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

Closed
wants to merge 1 commit into from

Conversation

tacaswell
Copy link
Member

This is to prevent plots with only one visible tick.

Use 3 instead of 2 because ticks may fall out of the visible range so 2
bins would be 3 ticks which may be one visible and 2 off either end.

closes #5784

This is to prevent plots with only one visible tick.

Use 3 instead of 2 because ticks may fall out of the visible range so 2
bins would be 3 ticks which may be one visible and 2 off either end.
@tacaswell tacaswell added this to the 2.0 (style change major release) milestone May 23, 2016
@efiring
Copy link
Member

efiring commented May 23, 2016

This doesn't do the job because nbins is just a maximum; there is nothing in place to enforce a minimum. The locator is still stuck trying to shoehorn in as many ticks as it can, up to the max, given all the other constraints.

If we want MaxNLocator to serve as a Max_and_Min_NLocator then we will need to add some sort of fallback logic: if the normal route yields fewer than the minimum number of ticks, back off on a constraint (such as the max) and try again, until the minimum is obtained.

@tacaswell
Copy link
Member Author

Your right. It might make it less likely to do the wrong thing, will not guarantee it will always do the right thing.

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

Successfully merging this pull request may close these issues.

dynamic ticking (#5588) should avoid (if possible) single ticks
2 participants