【发布时间】:2021-06-16 04:14:29
【问题描述】:
我使用包创建了一个洛伦兹曲线的大型 gganim
ggplot2, gglorenz, gganimate, transformr and gifski。
我使用以下代码创建了 gganim 图,使用 'wealth_lorenz'、5 个变量和约 250 万行的 df,
lorenz_chart <- ggplot(wealth_lorenz, aes(x = value, color = Limits)) + stat_lorenz() + transition_states(Time) + facet_wrap(~Limits)
创建的 gganim 对象大小为 103.4MB。
可以理解,使用animate(lorenz_chart) 在 Rstudio 中渲染需要很长时间。
有没有替代品可以更快用完?我知道这是一个非常大的带有刻面的数据集,所以它可能是不可能的。理想情况下,如果可能的话,我想使用 animate 包(请参阅here)将动画包含在 bookdown PDF_2 中。
感谢您的帮助!