Skip to contents

Reset par() after running

Usage

with_par(..., ops = NULL)

Arguments

...

Code to be evaluated

ops

A named list to be passed to graphics::par()

Value

Invisibly, the result of ...

Examples

with_par(
  plot(lm(Sepal.Length ~ Sepal.Width, data = iris)),
  plot(lm(Petal.Length ~ Petal.Width, data = iris)),
  ops = list(mfrow = c(2, 4))
)