Created
September 6, 2020 19:17
-
-
Save ylelkes/f9d94c1e2af1fcdae0c6734ea566e14e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mpg %>% group_by(cyl) %>% summarise(hwy=mean(hwy)) -> forplot | |
forplot$order <- c(1,2,3,4) | |
a <- ggplot(forplot, aes(x = cyl %>% as.factor(), y = hwy)) + | |
geom_bar(stat = 'identity') | |
plot <- a + transition_reveal(order) | |
animate(plot,nframes = 4,renderer = file_renderer("presentation//", prefix = "cars", overwrite = TRUE), | |
res=150,width=5,height=5,units="in") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment