Skip to content

Commit

Permalink
Only inspect user settable graphical params
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Dec 5, 2024
1 parent 1471e2b commit 5e2c01a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/helper-state.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
# We add a test on R >= 4.0.0 because some functions such as
# `globalCallingHandlers()` did not exist before.
get_pars_toreset <- function() {
pars <- par()
pars <- par(no.readonly = TRUE)
# The following params are set and modified automatically by plot() and we:
# 1. have no control over them
# 2. do not care about resetting them
pars <- pars[!names(pars) %in% c("cxy", "usr", "xaxp")]
pars <- pars[!names(pars) %in% c("usr", "xaxp")]
}

if (getRversion() >= "4.0.0") {
Expand Down

0 comments on commit 5e2c01a

Please sign in to comment.