I have a df containing 10000 data points that I want to add to a plot one by one using gganimate. So the data is:
df = data.frame(x = runif(10000),
y = runif(10000),
z = 1:10000) # z column is needed for transition_states()
I created the animation using:
library(ggplot2)
library(gganimate)
ggplot(df, aes(x, y)) +
geom_point() +
transition_states(z) +
shadow_mark() +
labs(title = "Point num: {closest_state}")
But I struggle to get all of my points shown in the animation. For example, I would like to show the points from 1 to 10000 to be added in the animation in about 60-100 seconds.