Learn R Programming

s20x (version 3.3.0)

saveGraphicsParameters: Save graphics parameters for later restoration

Description

Captures a graphics-parameter state and returns a closure that restores it. This helper centralises the common `par()`/`on.exit()` pattern used by diagnostic plotting functions.

Usage

saveGraphicsParameters(..., noReadonly = FALSE)

Value

A function that restores the saved graphics parameters and invisibly returns them.

Arguments

...

Graphics parameters passed to [graphics::par()] when `noReadonly = FALSE`.

noReadonly

Logical; if `TRUE`, save all readonly-safe graphics parameters using `par(no.readonly = TRUE)`.