Closed
Description
In the help file for geom_rug()
, it states that missing values are removed with a warning if na.rm = FALSE
.
This does not seem to be the case.
Example
library("ggplot2")
mtcars2 <- mtcars
mtcars2$mpg <- ifelse(runif(nrow(mtcars2)) < 0.2, NA, mtcars2$mpg)
ggplot(mtcars2, aes(x = wt, y = mpg)) +
geom_point() +
geom_rug()
In the example, a warning is generated from geom_point()
but not from geom_rug()
.
I think this is because x
and y
are both optional_aes
in GeomRug
, but the default Geom$handle_na()
only passes required_aes
and non_missing_aes
to remove_missing()
.
I will submit a pull request