Hi, I am trying to animate a line graph using the animate () feature but I keep getting the error of animation of gg objects not supported. I am able to create an animated line graph using transition_reveal, but the dimensions of the graph come out weird and grainy.
Here is my code:
graph <- ggplot(mydata, aes(x = birds, y = cost)) +
geom_line(color = "green") +
scale_x_reverse (breaks = c(100, 95, 90, 85, 80, 75, 70, 65, 60, 55, 50, 45, 40, 35, 30, 25, 20, 15, 10, 5, 0)) +
scale_y_continuous (breaks = c(0.00, 0.50, 1.00, 1.50, 2.00, 2.50, 3.00)) +
labs(x = "Birds)",
y = "Cost",
title = "Cost of birds")
Thank you!