Open tdhock opened 8 years ago
viz <- list(
yNA=ggplot()+
geom_point(aes(x, y),
data=data.frame(x=1:3, y=c(1:2, NA))),
xNA=ggplot()+
geom_point(aes(x, y),
data=data.frame(y=1:3, x=c(1:2, NA))))
animint2dir(viz)
makes http://bl.ocks.org/tdhock/raw/b0181e6caebfb60cfea01e1583b8ccad/
seems to be a problem in ggplot2 as well
i posted an ggplot2 issue https://github.com/hadley/ggplot2/issues/1711
apparently hadley does not think this is an issue, but it still does not make sense to me
as it is, scales are trained before removing NA rows (which will not be plotted). an example where this is problematic (but not a huge problem) is described in comments in test-renderer1-text.R https://github.com/tdhock/animint/blob/NA-separate-lines/tests/testthat/test-renderer1-text.R#L6-L11