je viens d'essayer d'animer des graphiques en utilisant les différentes sites qui en traitent.
Je rencontre un problème avec la qualité de l'animation. Celle-ci est sacadée avec un fond vert qui entrecoupe l'animation
Voici le code utilisé (sources: https://gganimate.com/index.html)
Code : Tout sélectionner
library(gganimate)
library(ggplot2)
theme_set(theme_bw())
library(gapminder)
p<-ggplot(gapminder, aes(gdpPercap, lifeExp, size = pop, colour = country)) +
geom_point(alpha = 0.7, show.legend = FALSE) +
scale_colour_manual(values = country_colors) +
scale_size(range = c(2, 12)) +
scale_x_log10() +
facet_wrap(~continent) +
# Here comes the gganimate specific bits
labs(title = 'Year: {frame_time}', x = 'GDP per capita', y = 'life expectancy') +
transition_time(year) +
ease_aes('linear')
animate(p, renderer = gifski_renderer())
anim_save("test.gif")
voici le gif que j'obtiens
https://ibb.co/cLFkBwJ
Un grand merci d'avance
Anthony