-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Make layer() accept formula notation for data argument #3245
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
Make layer() accept formula notation for data argument #3245
Conversation
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
There's a dependency on #3242... If you merge that one first and then update this to remove the rlang namespacing it's all good :-) |
Sure, thanks! |
man/theme.Rd
Outdated
@@ -251,15 +251,20 @@ p1 + theme( | |||
) | |||
|
|||
# Axes ---------------------------------------------------------------------- | |||
# Change styles of axes texts and lines |
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.
It seems these diffs of theme.Rd
come from #2934. It might be better to create a separate PR, but I let this included.
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.
Actually, that PR also missed to generate a new vdiffr reference image. Do you have the time to create a separate PR that includes the updated .Rd file and the missing image? That would probably be the best approach.
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.
Oh, sure. Will do.
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Fix #3138
data
is processed byfortify()
once and stored in layer. Then, if it's a function, it's applied to the plot data when the plot is built,ggplot2/R/layer.r
Lines 191 to 192 in 475042e
So, all we have to do is to define a
fortify()
method that converts a formula to a function.Usages
Created on 2019-04-13 by the reprex package (v0.2.1)