diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2014-04-29 08:12:11 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2014-04-29 08:12:11 +0200 |
commit | 4c5d5683f58a772239d27761dab1414526fef64e (patch) | |
tree | 8411c490d0a2a85198bae7ea0184a29fed0f476c /R/plot.mkinfit.R | |
parent | 163df96dd583d5b2505b88f86d70c7c8c962a325 (diff) |
Restore graphics parameters after plotting with residuals
Diffstat (limited to 'R/plot.mkinfit.R')
-rw-r--r-- | R/plot.mkinfit.R | 2 |
1 files changed, 2 insertions, 0 deletions
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) } } |