recordPlot {grDevices} | R Documentation |
Functions to save the current plot in an R variable, and to replay it.
recordPlot() replayPlot(x)
x |
A saved plot. |
These functions record and replay the displaylist of the current
graphics device. The returned object is of class
"recordedplot"
, and replayPlot
acts as a print
method for that class.
The returned object is stored as a pairlist, but the usual methods for
examining R objects such as deparse
and
str
are liable to mislead.
recordPlot
returns an object of class "recordedplot"
.
replayPlot
has no return value.
The format of recorded plots may change between R versions. Recorded plots should not be used as a permanent storage format for R plots. There were extensive changes in R 3.0.0, and only plots recorded in that or later can be replayed in this version of R.
R will always attempt to replay a recorded plot, but if the plot was recorded with a different R version or build then bad things may happen.