I\'m trying to build an animated barplot with ggplot2
and magick
that\'s growing on a \"day per day\" base. Unfortunately, I\'ve got tenthousands o
I would do
library(tidyverse)
library(gganimate)
x %>%
as.tibble() %>%
arrange(date) %>%
group_by(category) %>%
mutate(Sum=cumsum(value)) %>%
ggplot(aes(category, Sum, fill = category)) +
geom_col(position = 'identity') +
ggtitle("{frame_time}") +
transition_time(date) +
ease_aes('linear')
anim_save("GIF.gif")
If it's to much data I recommend to increase the transition time to months instead of days.