I'm currently following this tutorial to learn to create animated plots using the gganimate
library.
However I'm already struggling with the first animation. While the animation itself works, its resolution is downscaled as compared to the example on the website. Resizing the 'Viewer' in RStudio does not change the dimensions/resolution. Plotting the image without animation (plot(p)
) creates a plot in 'Plots' that has the same dimensions and resolution as the one from the website. Do I need to adjust some settings for the Viewer? I'm working on Windows 10, RStudio Version 1.4.1717, R Version 4.1.1.
The animation from my viewer:
Appearance of the same animated plot from the website:
Code from the website to create the above animated plot:
library(gganimate)
p <- ggplot(iris, aes(x = Petal.Width, y = Petal.Length)) +
geom_point()
anim <- p +
transition_states(Species,
transition_length = 2,
state_length = 1)
anim