saveGraphicsParameters: Save graphics parameters for later restoration

View source: R/graphics-parameter-helpers.R

saveGraphicsParametersR Documentation

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)

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)'.

Value

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


s20x documentation built on July 1, 2026, 9:06 a.m.