[R] resetting par() to all defaults: par(reset=TRUE) ?

Michael Friendly friendly at yorku.ca
Sat Sep 29 21:43:57 CEST 2007


In a long session, producing multiple graphs, I sometimes repeatedly
change par() settings, particularly with multi-row/col displays.
If I'm using a script, I'll do

op <- par(newsettings)
... plots ...
par(op)

but sometimes I do things on the fly and can't easily back out
to the default settings.  I'm looking for someway to do the
equivalent of

par(reset=TRUE)

I suppose I could do something like create Rprofile.site containing

.First <- function() par.default <- par()

and then par(par.default), but maybe there's an easier way I haven't 
noticed.  [On Windows, I don't use Rprofile.site because it's one more
thing to update with each new version.]

-Michael

-- 
Michael Friendly     Email: friendly AT yorku DOT ca
Professor, Psychology Dept.
York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street    http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT  M3J 1P3 CANADA



More information about the R-help mailing list