-1

How do I slow the plot below, down? I am trying to step through the days a bit slower. This is three years worth of data shown by day. Each day should be about 0.25 seconds.

enter image description here

The code I am using to build this plot is below:

library(tidyverse)
library(gganimate)

df_daily %>%
    ggplot(aes(longitude, latitude)) +
    geom_point(aes(alpha = a)) +
    transition_time(flu_day) +
    ease_aes('linear', interval = 0.001) +
    labs(title = 'Date: {frame_time}')
BillZ
  • 127
  • 2
  • 7
  • 2
    Can you make your problem [reproducible](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)? – markus Oct 19 '18 at 20:00

1 Answers1

14
a <- df_daily %>%
    ggplot(aes(longitude, latitude)) +
    geom_point(aes(alpha = a)) +
    transition_time(flu_day) +
    ease_aes('linear', interval = 0.001) +
    labs(title = 'Date: {frame_time}')



animate(a, 
        duration = 274, # = 365 days/yr x 3 years x 0.25 sec/day = 274 seconds
        fps  =  [pick how smooth you want],
        nframes = [...or pick it here])
Jon Spring
  • 55,165
  • 4
  • 35
  • 53