From 6fd8b2a1ef16265f12d54bb182393bdeaada2db4 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 26 Jun 2014 08:11:49 +0200 Subject: Start new version, add xlim to mkinresplot --- R/mkinresplot.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'R/mkinresplot.R') diff --git a/R/mkinresplot.R b/R/mkinresplot.R index 07bd7dfa..c9a801fd 100644 --- a/R/mkinresplot.R +++ b/R/mkinresplot.R @@ -19,8 +19,9 @@ if(getRversion() >= '2.15.1') utils::globalVariables(c("variable", "residual")) mkinresplot <- function (object, obs_vars = names(object$mkinmod$map), + xlim = c(0, 1.1 * max(object$data$time)), xlab = "Time", ylab = "Residual", - maxabs = "auto", legend= TRUE, lpos = "topright", ...) + maxabs = "auto", legend= TRUE, lpos = "topright", ...) { obs_vars_all <- as.character(unique(object$data$variable)) @@ -36,7 +37,7 @@ mkinresplot <- function (object, names(col_obs) <- names(pch_obs) <- obs_vars plot(0, xlab = xlab, ylab = ylab, - xlim = c(0, 1.1 * max(object$data$time)), + xlim = xlim, ylim = c(-1.2 * maxabs, 1.2 * maxabs), ...) for(obs_var in obs_vars){ -- cgit v1.2.1