[R] Fw: Plotting in subareas using par(fig=) parameter

Marc Schwartz mschwartz at medanalytics.com
Fri Feb 7 17:02:14 CET 2003

>-----Original Message-----
>From: r-help-admin at stat.math.ethz.ch 
>[mailto:r-help-admin at stat.math.ethz.ch] On Behalf Of 
>Rex_Bryan at urscorp.com
>Sent: Friday, February 07, 2003 9:47 AM
>To: Sundar Dorai-Raj; ripley at stats.ox.ac.uk
>Cc: r-help at stat.math.ethz.ch
>Subject: Re: [R] Fw: Plotting in subareas using par(fig=) parameter
>Sundar and Brian,
>Thank you both.
>Despite the oddly inverted command structure of par(new=TRUE) 
>when one wants plot a new plot without erasing an old one, it 
>works like a charm.  It works so well that I have to remember 
>to put par(new=FALSE) to create a clean slate for  new plots! REX


To your point regarding the modifications to par() and as you might
get more complex in those modifications, you might want to consider
"wrapping" your code within the following two lines:

op <- par(no.readonly = TRUE) 

...your code...


This sets 'op' to contain those parameters that you might modify in
your code and then restores par() to the values that were present
prior to your manipulation. This is contained in the examples and
elsewhere in ?par.  There is a caveat in the "Note" section of the
?par help page to be aware of in this situation.


Marc Schwartz

More information about the R-help mailing list