aboutsummaryrefslogtreecommitdiff
path: root/R/plot.mixed.mmkin.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-02-24 14:46:10 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2021-02-24 14:50:54 +0100
commit28c0dff7d7191f854be610b5384e965d9b191f98 (patch)
tree8657f9accadc1df90cc73f835fea88ea10c24359 /R/plot.mixed.mmkin.R
parentf90094c2c35a3e1118989678eef7fcf4d2dcb44a (diff)
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.
Diffstat (limited to 'R/plot.mixed.mmkin.R')
-rw-r--r--R/plot.mixed.mmkin.R1
1 files changed, 1 insertions, 0 deletions
diff --git a/R/plot.mixed.mmkin.R b/R/plot.mixed.mmkin.R
index 1674d855..21399496 100644
--- a/R/plot.mixed.mmkin.R
+++ b/R/plot.mixed.mmkin.R
@@ -167,6 +167,7 @@ plot.mixed.mmkin <- function(x,
# Start of graphical section
oldpar <- par(no.readonly = TRUE)
+ on.exit(par(oldpar, no.readonly = TRUE))
n_plot_rows = length(obs_vars)
n_plots = n_plot_rows * 2

Contact - Imprint