age_animate | R Documentation |
visualize age interaction with gganimate
age_animate(d, weight_sigma = 2, rep_steps = 100, test_age = NULL, ...)
d |
dataframe with age |
weight_sigma |
how fast points disappear (higher is faster) |
rep_steps |
how many steps to plot |
test_age |
show only a single frame at 'test_age' instead of animating |
... |
additional ggplot aesthetics. probably want x= and y= #@importFrom viridis scale_color_viridis #@importFrom gganimate ease_aes transition_time |
d <- data.frame(age=seq(10,30, length.out=8),
x=runif(8,0,10),
y=runif(8,0,10))
p <- age_animate(d, rep_steps=16, x=x, y=y)
p2 <- age_animate(d, test_age=10) + aes(x=x,y=y) + cowplot::theme_cowplot() + theme(legend.position='none')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.