[R] How to restore and edit saved graphics?

Gabor Grothendieck ggrothendieck at myway.com
Sun May 16 05:58:59 CEST 2004


Saving of the low level graphics that R displays can be 
1. turned on with dev.control(displaylist="enable") and 
2. turned off with dev.control(displaylist="inhibit").  
recordPlot() can be used to save the display list in a variable.

For example:

# turn on display list, perform plot, turn off display list, add title
# do not need next line if graphics device already active
windows()  # or x11() on unix
dev.control(displaylist="enable") 
plot(1:10)
myplot <- recordPlot() 
dev.control(displaylist="inhibit")  
title(main="My Title")

# now redisplay plot as it was before title and reissue title
myplot 
title(main="My Other Title")

Shin <sdhyok <at> email.unc.edu> writes:

: 
: I am looking for a function to restore saved graphics for further
: editing, such as changing its title, labels, or legend.
: How can I do it in R? Thanks in advance.
:




More information about the R-help mailing list