-
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
purrr style lambda notation in scale arguments #4427
Conversation
Sync branches
Sync with tidyverse/ggplot2
I came across issue #4103 as well, which seemed related and worth mentioning. |
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.
Looks great!
@thomasp85
Can we have this in 3.3.4?
Co-authored-by: Hiroaki Yutani <yutani.ini@gmail.com>
@thomasp85 |
Sorry for lack of response, go ahead and merge |
It's fine. Thanks for confirming! |
scale part was resolved by tidyverse#4427
This PR aims to enable purrr style lambda notation for scale arguments that accept functions (
limits
,breaks
,minor_breaks
,labels
,rescaler
andoob
). It does so by converting formulas to functions in the scale constructors. Thomas mentioned that lambda notation should work in #4173 (comment), but the notation is currently not enabled.This PR has partial overlap in scope and in functions altered with #4188. Notable differences are that this PR doesn't touch facet labellers, but applies the lambda notation to more arguments and in all three types of scales (continuous, binned and discrete).
Thank you for considering!