首页 > 解决方案 > gganimate 与层有什么问题?

问题描述

我正在关注 gganimate 的基本教程:

p <- ggplot(iris, aes(x = Petal.Width, y = Petal.Length)) + 
geom_point()

当我尝试下面的代码片段时:

p + transition_states(Species,
                  transition_length = 2,
                  state_length = 1)

我收到以下错误:

Error in l$setup_layer(d, plot) : attempt to apply non-function

我猜这与软件包版本有关,但有人可以帮忙吗?

谢谢

标签: rggplot2gganimate

解决方案


推荐阅读