Closed
Description
When using the weight
aesthetic with geom_smooth()
, I now get the following warning that did not occur before version 3.4.0:
Warning message:
The following aesthetics were dropped during statistical transformation: weight
ℹ This can happen when ggplot fails to infer the correct grouping structure in the data.
ℹ Did you forget to specify a `group` aesthetic or to convert a numerical variable into a factor?
Here is a reprex:
library(ggplot2)
ggplot(mtcars, aes(wt, mpg)) +
geom_point(aes(size = cyl)) +
geom_smooth(aes(weight = cyl),
method = "loess")
I am unclear about why this warning arises. I believe it is related to #4917.