Re: [R] HOW to Create Movies with R with repeated plot()?

From: Francisco J. Zagmutt <>
Date: Thu 28 Jul 2005 - 03:47:56 EST

What platform are you working on? On windows you can also create an animated gif file using ImageMagik ( from the cmd or you can use the more user friendly UnFREEz downloadable at ot Microsoft GIF animator(search for it on google). All the software mentioned are free and I have used them in the past to animate R output. Take a look at RSiteSearch("movie") for other interesting threads.



>From: Martyn Plummer <>
>To: Jan Verbesselt <>
>Subject: Re: [R] HOW to Create Movies with R with repeated plot()?
>Date: Wed, 27 Jul 2005 15:23:54 +0200
>On Wed, 2005-07-27 at 12:11 +0200, Jan Verbesselt wrote:
> > Dear R-helpers,
> >
> >
> >
> > Is it possible to create a type of 'movie' in R based on the output of
> > several figures (e.g., jpegs) via the plot() function. I obtained
> > results with the plotting function and would like to save these as a
> > (e.g., avi or other formats)?
>You can use ImageMagick tools to convert a set of bitmap files into an
>animated GIF. For example, in R, this creates 101 separate png files:
>x <- seq(-1,1,length=101)
>y <- x^2
>for (i in 1:length(y)) {
> plot(x[1:i], y[1:i], xlim=c(-1,1), ylim=c(0,1), type="l")
>Then, on the command line (on Linux) this joins them together
>convert -delay 10 Rplot*.png Rplot.gif
>animate Rplot.gif
>You can also create MNG format, but this is less widely supported.
>This message and its attachments are strictly confidential. ...{{dropped}}
> mailing list
>PLEASE do read the posting guide!
> mailing list PLEASE do read the posting guide! Received on Thu Jul 28 03:58:21 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:34:06 EST