Regression: NA values not being handled correctly in GeomRibbon #1549
Comments
Can you please include a minimal reproducible example inline? |
Sure. The following program should have a gap at x==4, (where there is an NA in the data). But it does not. However it does if I create a new GeomRibbon identical to the first but with a handle_na default function doing nothing. require(dplyr) set.seed(1) test <- data.frame(x = rep(1:10, 3), y = abs(rnorm(30)), z = rep(LETTERS[1:3], 10)) %>% arrange(x, z) test[test$x == 4, "y"] <- NA test$ymax <- test$y ggplot(test, aes(x = x, y = y, ymax = ymax, ymin = ymin, fill = z)) + |
There seems to be a missing handle_na function in GeomRibbon. I answered a question with a workaround here: http://stackoverflow.com/questions/35454277/can-you-make-geom-ribbon-leave-a-gap-for-missing-values/35461050#35461050
The text was updated successfully, but these errors were encountered: