-
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
Feature request: alternate expand
parameter
#6020
Labels
Comments
It turns out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A common reason to muck around with a scale's
expand
argument is to ensure 0-anchored geometries likegeom_bar()
orgeom_area)
touch the x-axis without a gap.The
expand
argument in scales is not very intuitive and I just happen to rememberc(0, 0, 0.05, 0)
as a rote incantation to get what I want. The helper function,expansion()
, is also no help in this case, as I want to asymmetrically expand the scale. Adding to the confusion is thatcoord_cartesian(expand)
, which has the same argument name and fusses over the same setting, takes a true/false value instead of the four values.What I'm proposing is to rewire the
coord_*(expand)
argument to take top/right/bottom/left true/false values. It mirrors the setup we have formargin()
, so it shouldn't be too unfamiliar to regular users.Created on 2024-08-01 with reprex v2.1.1
The text was updated successfully, but these errors were encountered: