Re: [R] Use of recordPlot

From: Mike Prager <>
Date: Mon, 28 Apr 2008 13:05:19 -0400

"Beck, Kenneth (STP)" <> wrote:

To be able to page through plots, open the graphics device with recording turned on before plotting. Then you can use PageUp and PageDown keys to see the plots in sequence. The plots are stored into .SavedPlots. (AFAIK they cannot be accessed with replayPlot. I don't use that, but I think it is used when a plot has been saved into a variable with the recordPlot function.)

To enable this sort of session-specific recording, I use the following code in an script before plotting:
windows(record = TRUE)
.SavedPlots <- NULL

You may need to change the code to suit your own needs.

Does that help?


> [...]
> But the end of your response hits on the key issue: when I create
> several graphs, I would like to be able to use PgUp/PgDn or some other
> keystroke to easily scroll through them all in sequence. One of my
> scripts now creates 30+ graphs, and to view them I have to mouse to the
> list of graphics devices and pick off the list. Your last comment
> indicates you can set it up to quick page through lists of graphs.
> I just tried adding options(graphics.record=TRUE); to my code, and I now
> find the .SavedPlots variable in the work space, but I was hoping to use
> replayPlot(.SavedPlots) or something like that to be able to scroll
> through the plots, but it does not seem to work.
> [...]
> Is there a simple command or series of commands to add to the script to
> enable scrolling through all plots generated by that script? Or maybe
> something at the beginning with something else at the end??

Mike Prager, NOAA, Beaufort, NC
* Opinions expressed are personal and not represented otherwise.
* Any use of tradenames does not constitute a NOAA endorsement.

______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 28 Apr 2008 - 18:18:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 28 Apr 2008 - 19:30:33 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive