【问题标题】:Slow down gganimate in R [duplicate]在R中减慢gganimate [重复]
【发布时间】:2018-10-20 05:27:30
【问题描述】:

如何减慢下面的情节?我试图慢慢地度过这些日子。这是按天显示的三年数据。每天应该是 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}')

【问题讨论】:

标签: r gganimate


【解决方案1】:
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])

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-05-20
    • 2016-01-31
    • 1970-01-01
    • 2018-10-24
    • 1970-01-01
    • 1970-01-01
    • 2017-03-15
    • 2011-10-01
    相关资源
    最近更新 更多