library(animation) setwd("c:\\plot\\") ani.options( convert = shQuote('C:\\Program Files\\ImageMagick-6.8.6-Q16\\convert.exe') ) saveGIF( { for (i in 1:10) plot(runif(10), ylim = 0:1) }, movie.name = "test.gif", interval = 0.2, ani.width = 300, ani.height = 300, outdir = getwd() )