From 64fa10032f99490a5998589161574109484ee769 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Wed, 24 Feb 2021 14:46:10 +0100 Subject: Reset graphical parameters with on.exit() plot.mixed.mmkin did not reset graphical parameters at all. The other plotting functions did not use on.exit, so this change should make the use of the plotting functions safer. --- R/plot.mmkin.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'R/plot.mmkin.R') diff --git a/R/plot.mmkin.R b/R/plot.mmkin.R index f8ed1f9a..2166b30e 100644 --- a/R/plot.mmkin.R +++ b/R/plot.mmkin.R @@ -65,6 +65,7 @@ plot.mmkin <- function(x, main = "auto", legends = 1, { oldpar <- par(no.readonly = TRUE) + on.exit(par(oldpar, no.readonly = TRUE)) n.m <- nrow(x) n.d <- ncol(x) @@ -153,6 +154,4 @@ plot.mmkin <- function(x, main = "auto", legends = 1, } mtext(paste(fit_name, "residuals"), cex = cex, line = 0.4) } - - par(oldpar, no.readonly = TRUE) } -- cgit v1.2.1