From 4c5d5683f58a772239d27761dab1414526fef64e Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 29 Apr 2014 08:12:11 +0200 Subject: Restore graphics parameters after plotting with residuals --- R/plot.mkinfit.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R index 386452f..4132d96 100644 --- a/R/plot.mkinfit.R +++ b/R/plot.mkinfit.R @@ -60,6 +60,7 @@ plot.mkinfit <- function(x, fit = x, # Set up the plot if not to be added to an existing plot if (add == FALSE) { if (show_residuals) { + oldpar <- par(no.readonly = TRUE) layout(matrix(c(1, 2), 2, 1), heights = c(2, 1.3)) par(mar = c(3, 4, 4, 2) + 0.1) } @@ -92,5 +93,6 @@ plot.mkinfit <- function(x, fit = x, points(residuals_plot, pch = pch_obs[obs_var], col = col_obs[obs_var]) } abline(h = 0, lty = 2) + par(oldpar, no.readonly = TRUE) } } -- cgit v1.2.1