Skip to contents

Restores the graphical parameters changed by splot()/fplot() (or by sxxx()/fxxx() functions with reset = FALSE) or those previously set as the default ones.

Usage

par.reset(default = FALSE, set = FALSE)

Arguments

default

logical; if FALSE (default) restores the parameters saved automatically by the last call to splot() or fplot(). If TRUE, restores the default parameters (those in effect before the first call to splot()/fplot() or set with par.reset(set = TRUE)).

set

logical; if TRUE, saves the current graphical parameters as the new defaults (the graphical parameters are not changed).

Value

Invisibly returns the graphical parameters as they were before restoring/saving (see par()).

See also

Examples

scale.range <- range(mtcars$mpg)
splot(slim = scale.range, legend.lab = "mpg")
with(mtcars,
  plot(hp, qsec, col = scolor(mpg, slim = scale.range),
       pch = 16, cex = 1.5)
)

par.reset() # restores parameters from the last splot()/fplot() call

# Set current parameters as the new default
par.reset(set = TRUE)
# ... later, after several splot()/fplot() calls ...
par.reset(default = TRUE) # restores those that were set as defaults