-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Change function signature of Geom$draw_layer() #3854
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
Comments
I have re-read all the comments from #3116 (comment) down and it looks to me that we never got to a better solution than adding |
I did a PR that implemented I think that using the |
I guess we need an executive decision. @thomasp85 Can you make the call? And should the theme be part of the layout or be handled separately? |
(My unqualified two cents is that something like |
That just makes me deeply uncomfortable. I'd much rather stick the theme into the layout object. I'm fine with sticking scales into the layout also if that looks like the best compromise. |
Sorry, I need to think some more about this - my head has been with the release for a while. The only thing I can say with a fair amount of certainty is the the Layout object should not be handed off. This is an internal structure and we will regret the day we ever give extension developers access to it |
Thomas, I'm not sure I understand. The Layout object is already accessible to extension developers, via |
So it is... but both compute_layer and draw_layer are both not advertised as extension points and I have no problem burning people that implements something weird there using the layout... The layout is decidedly not a user facing object and should not be passed around. It is neither documented nor intended to be stable. We already have so much development constraint because developers rely on undocumented objects |
If there is anything the geom drawing bit may need to add in terms of parameters, you can just funnel it through the |
Several distinct issues have arisen where
Geom$draw_layer()
needs more info than it is currently given. Specifically, it looks like it would be good to hand it a new object calledlayer_params
(#3116 (comment)) as well as the theme (#2749 (comment)). Is there anything else that we should add, while we're add it?The current signature is as follows:
ggplot2/R/geom-.r
Line 74 in 83c8123
I propose the following signature:
The
...
future-proofs this in case we are still missing something.@paleolimbot @thomasp85 Are you guys still on board with
layer_params
as discussed here: #3116 (comment) or has your thinking evolved since then?We could also now make the function signature
and leave the
layer_params
issue for a future date.The text was updated successfully, but these errors were encountered: