[R] multiple plots in png output

From: Karen L. Updegraff <karen_at_brimson.com>
Date: Sat 20 Aug 2005 - 04:25:13 EST


I am using R version 1.9.1 under Linux.

In the past I have had no problem saving a multi-plot page to a postscript or png device. However, the last time I did this may have been under a previous version of R. Presently nothing I do seems to succeed in saving multi-plots, defined (for example) with mfrow=c(2,2) ... plot(..) .. plot(..)

The same problem has occurred using hist() and plot(). These are not plots that lend themselves to a lattice format, so that is not really an option. The multi-plot page displays fine with the default (x11) graphics device but in the saved file only the last plot shows up.

The only suggestion of a problem that I found in the R documentation was a warning that png and "similar devices" would tend to save only the last page of a multi-page plot, unles you used something like "%d" to indicate the file sequence. There are no details on how or where that option might be used. R documentation frequently seems to go out of its way to be opaque.

Is this a bug that was introduced with v 1.9.1, and if so has it been fixed in more recent releases? Alternatively, is there a workaround which is not documented?

Suggestions appreciated.
Karen



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 Sat Aug 20 04:31:10 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:55 EST