[R] playing with R: make a animated GIF file...

From: Katharine Mullen <kate_at_few.vu.nl>
Date: Thu 06 Oct 2005 - 20:57:17 EST

you could first make the frames to put together in R, then outside of R glue the frames into a gif.


for(i in 1:frames) {

      jpeg(paste("ani_", i, ".jpg", sep = ""))
      plot(1:10,1:10, col = i)


then use an image editing program to glue the jpgs together -- eg free and crossplatform imagemagick (www.imagemagick.org). under linux and once imagemagick is installed, the command

$ convert -delay 10 ani_*.jpg animation.gif

makes a looping animated gif `animation.gif' with 10/100 sec. between frame flips.

Katharine Mullen
Department of Physics and Astronomy
Faculty of Sciences
Vrije Universiteit
de Boelelaan 1081
1081 HV Amsterdam
The Netherlands
room: T.1.06
tel: +31 205987870
fax: +31 205987992
e-mail: kate@nat.vu.nl

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Oct 06 21:09:20 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:24:15 EST