我如何放慢下图的速度?我正尝试逐步走慢一点。这是每天显示的三年数据。每天大约需要0.25秒。
我用于构建该图的代码如下:
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}')
答案 0 :(得分:3)
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])