【问题标题】:Why does this gganimate code locked binding error?为什么这个 gganimate 代码锁定绑定错误?
【发布时间】:2019-05-13 01:36:38
【问题描述】:

我是第一次使用 gganimate,我只是想从 github 运行示例代码,就是这样:

library(ggplot2)
library(gganimate)
ggplot(mtcars, aes(factor(cyl), mpg)) + 
geom_boxplot() + 
# Here comes the gganimate code
transition_states(
gear,
transition_length = 2,
state_length = 1
) +
enter_fade() + 
exit_shrink() +
ease_aes('sine-in-out')

但是当我尝试运行它时出现错误。 (这与我尝试用 gganimate 做任何事情的错误相同。)是这样的:

Error in gifski_first_error <<- FALSE : 
cannot change value of locked binding for 
'gifski_first_error'

谢谢!

【问题讨论】:

  • 哦 - 那是我的错...会马上解决

标签: r animation ggplot2 graph gganimate


【解决方案1】:

我遇到了类似的问题。尝试安装“gifski”和“png”包,然后运行提供的代码。

发生错误是因为 gifski_renderer() 是当前的默认渲染器。

点击这里了解更多信息:https://github.com/thomasp85/gganimate/commit/8248357809860c0e1a90eaf1f2ac1cdee1a95a64

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-01-01
    • 1970-01-01
    • 2014-06-05
    • 2013-09-04
    • 1970-01-01
    • 1970-01-01
    • 2021-05-27
    • 2018-05-09
    相关资源
    最近更新 更多