You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main motivation is to allow for users to rely on ggplot2's own plot_build method without having to rewrite the entire method just to change the Layout's functionality slightly. I see this was briefly up for debate before. As a result of #2527, only the Layer ggproto class was exported, but create_layout was not.
A specific use case I would like to build is to create a Layout that does not assume all panels have the same scales type. Many places in the code, ggplot2 assumes all y positional scales share the same aesthetics so you see the following self$panel_scales_y[[1]]$aesthetics whereas my implementation may look something like unique(unlist(lapply(self$panel_scales_y, function(s) s$aesthetics)))
The text was updated successfully, but these errors were encountered:
I am curious if the developers of
ggplot2
would be open to making acreate_layout
S3 generic, that takes one parameterplot
.It may look something like the following
The main motivation is to allow for users to rely on
ggplot2
's ownplot_build
method without having to rewrite the entire method just to change the Layout's functionality slightly. I see this was briefly up for debate before. As a result of #2527, only theLayer
ggproto class was exported, butcreate_layout
was not.A specific use case I would like to build is to create a Layout that does not assume all panels have the same scales type. Many places in the code,
ggplot2
assumes all y positional scales share the same aesthetics so you see the followingself$panel_scales_y[[1]]$aesthetics
whereas my implementation may look something likeunique(unlist(lapply(self$panel_scales_y, function(s) s$aesthetics)))
The text was updated successfully, but these errors were encountered: