-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Continuous limits for discrete scales #6273
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
Continuous limits for discrete scales #6273
Conversation
I now also believe this would be needed for #3441 to make copies of discrete scales with immutable ranges. |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
many thanks for implementing the feature i had raised in #4174.!! I was just giving it a try, and fail to understand how I can "top-align" the bars within a facet. Thanks again for all your contributions to ggplot2 and beyond! |
You can use |
This PR aims to fix #6259 and fix #4174.
Briefly, the discrete position scales get a new argument
continuous.limits
which controls what range is displayed.It always acts as 'zoom limits', similar to limits set in the coord or continuous limits with
oob = scales::oob_keep()
.Reprex from #4174:
Created on 2025-01-07 with reprex v2.1.1