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
My colorplaner ggplot2 extension involves a scale which accepts an aesthetic unknown to the layer and maps that aesthetic to one the layer accepts (specifically, a secondary color/fill mapping translated through a bivariate color scale to color or fill).
With the changes in befc4d0 for issue #1585, a warning is now generated if that mapping is created at the layer level:
In this instance the warning is untrue, as the scale interprets color2 and the plot is generated as expected. However, since the layers are ignorant of their scales, I cannot figure out a solution to inform the layers of the scale's handling of the aesthetic to avoid this warning. This isn't a show stopper as the mapping can simply be done at the plot level or the warning can be ignored, but it could certainly introduce confusion to users.
The layer function now includes a check.aes parameter option to skip this checking, but it does not seem possible to pass that parameter through the standard geom_* constructors, as the ... arguments to geom_* get wrapped up in a params list passed on to layer (e.g. in geom_pointhere).
I definitely don't want to go down that route because it makes check.aes and check.param behave differently to the other layer parameters. Basically the problem is that you're trying to extend ggplot2 in a way that it wasn't designed to be extended, and you're going to keep running into these problems. I don't think there will be an elegant fix - you'll just need to figure out how to hack around the problem somehow.
My colorplaner ggplot2 extension involves a scale which accepts an aesthetic unknown to the layer and maps that aesthetic to one the layer accepts (specifically, a secondary color/fill mapping translated through a bivariate color scale to
color
orfill
).With the changes in befc4d0 for issue #1585, a warning is now generated if that mapping is created at the layer level:
In this instance the warning is untrue, as the scale interprets color2 and the plot is generated as expected. However, since the layers are ignorant of their scales, I cannot figure out a solution to inform the layers of the scale's handling of the aesthetic to avoid this warning. This isn't a show stopper as the mapping can simply be done at the plot level or the warning can be ignored, but it could certainly introduce confusion to users.
The
layer
function now includes acheck.aes
parameter option to skip this checking, but it does not seem possible to pass that parameter through the standardgeom_*
constructors, as the...
arguments togeom_*
get wrapped up in aparams
list passed on tolayer
(e.g. ingeom_point
here).Would you consider a PR that altered
layer()
to look for and honorcheck.aes
andcheck.param
within itsparams
argument?The text was updated successfully, but these errors were encountered: