-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Change minor_breaks interface #3591
Conversation
To pass in both limits and major breaks. This will make it much easier to create useful families of minor break functions in scales. Fixes #3583
This helps a lot, but there's a major drawback: the breaks always start within the limits, so this doesn't generate any minor breaks between the minimum and first break, and the last break and the maximum. You can see the problem with a log scale with 10 minor breaks between each major break — you should see breaks to the left of 1. |
But maybe I can handle that by also using the limits, and doing something more sophisticated than just using a fixed number of breaks for log scales. |
Just a quick note...that could partially be fixed by removing break censoring in |
Having briefly explored the possibility of using the range, I think your suggestion would be a better approach @paleolimbot. |
I seem to remember trying this once, and the trick is getting manually specified labels to work right (manually specified labels have to be the same length as the within-limit breaks). |
@hadley where are we on this? |
Lets hold off on this as it needs more changes to be fully useful. |
@hadley is it viable to get this into the next release? |
@thomasp85 I have no idea |
I explored this for a bit, but there are plenty of places outside the guides where that approach gives issues, mostly in coords when dealing with the panel grid. I think the change in the PR improves the current situation, and any 'full' solution would include these changes as well. |
* reimplement #3591 * Do not censor major breaks * view scales censor major breaks after calculation of minor breaks * guides censor breaks * tests expect non-censored breaks * add news bullet * adjust docs * fix typo
Closing this PR in favour of #5569. |
To pass in both limits and major breaks. This will make it much easier to create useful families of minor break functions in scales.
Fixes #3583
@thomasp85 — if you think this approach is reasonable I'll work on a NEWS bullet. I think documentation will need to happen in a separate PR because all of
breaks
,labels
, andminor_breaks
need revision to point to the reader towards the scales package.