R 如何创建基于日期列的动画散点图?
我有一个R数据框,如下所示: 像这样的情节:R 如何创建基于日期列的动画散点图?,r,dataframe,ggplot2,gganimate,R,Dataframe,Ggplot2,Gganimate,我有一个R数据框,如下所示: 像这样的情节: p <- ggplot(dftot, aes(x=V1, y=V2)) + geom_point(size=0.1, shape=16, stroke = 0, color = '#1F45FC') + geom_point(aes(x=V1, y=V2), data=dftot1, stroke = 0, color = '#FCD71E', size=0.1, shape=16) 但只需重复相同的绘图,但不带动画。如果您希
p <- ggplot(dftot, aes(x=V1, y=V2)) +
geom_point(size=0.1, shape=16, stroke = 0, color = '#1F45FC') +
geom_point(aes(x=V1, y=V2), data=dftot1, stroke = 0, color = '#FCD71E', size=0.1, shape=16)
但只需重复相同的绘图,但不带动画。如果您希望其他人帮助,请发布一个示例数据帧。如果您希望其他人帮助,请发布一个示例数据帧。
p +
transition_states(JoiningDate,
transition_length = 2)