if (FALSE) {
library(animint2)
mtcars$Cyl <- factor(mtcars$cyl)
viz <- animint(
ggplot(mtcars, aes(x = mpg, y = disp, color=Cyl)) +
geom_point(),
ggplot(mtcars, aes(x = hp, y = wt, color=Cyl)) +
geom_point(),
title="Motor Trend Cars data viz",
source="https://github.com/animint/animint2/blob/master/R/z_pages.R"
)
animint2pages(viz, "animint2pages-example-mtcars")
}
Run the code above in your browser using DataLab