Search code examples
rgganimate

Why is there some intermittent colour (green) when using gganimate()?


I installed gganimate on Rstudio and followed the examples on their vignette:

library(ggplot2)
library(gganimate)
library(gapminder)

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')

However, when rendering the animation, it displays an intermittent green blip that makes it impossible to distinguish what is happening. I understand it is not a problem of gganimate but the rendering process. Certainly, I don't know what else to do.

In this link is the animation created

enter image description here

platform       x86_64-apple-darwin17.0     
arch           x86_64                      
os             darwin17.0                  
system         x86_64, darwin17.0          
status                                     
major          4                           
minor          0.4                         
year           2021                        
month          02                          
day            15                          
svn rev        80002                       
language       R                           
version.string R version 4.0.4 (2021-02-15)
nickname       Lost Library Book

       

Solution

  • Try this: animate(anim, renderer = magick_renderer())