Skip to content

Is there a single command that can revert all the plotting parameters to default?

4 messages · Arthur Roberts, stephen sefick, Adaikalavan Ramasamy +1 more

#
Hi, all,

This might be a stupid question.  Is there a single command in R that  
can revert parameters to default?  It is much appreciated.

Best wishes,
Art Roberts
University of Washington
#
when you set par(...)
use
op <- par(...)
par(...)

and then when you want to go back
use

par(op)
On Wed, Sep 24, 2008 at 2:38 PM, Arthur Roberts <aroberts99163 at yahoo.com> wrote:

  
    
#
What do you mean? If you kill the existing graph, perhaps using 
dev.off(), the next plot generated should use default values. Is this 
what you want?

Some plotting functions use this at the start before modifying
   oldpar <- par(no.readonly=T)
   on.exit(par(oldpar))

Regards, Adai

Regards, Adai
Arthur Roberts wrote:
#
dev.off() (but stephan's advice is probably the better approach for most cases).

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111