diff options
-rw-r--r-- | DESCRIPTION | 4 | ||||
-rw-r--r-- | R/plot.mkinfit.R | 5 | ||||
-rw-r--r-- | man/plot.mkinfit.Rd | 8 |
3 files changed, 12 insertions, 5 deletions
diff --git a/DESCRIPTION b/DESCRIPTION index c9f4722..c4ae84d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,8 +2,8 @@ Package: mkin Type: Package Title: Routines for fitting kinetic models with one or more state variables to chemical degradation data -Version: 0.9-14 -Date: 2013-02-18 +Version: 0.9-15 +Date: 2013-03-04 Author: Johannes Ranke, Katrin Lindenberger, René Lehmann Maintainer: Johannes Ranke <jranke@uni-bremen.de> Description: Calculation routines based on the FOCUS Kinetics Report (2006). diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R index 41b4cb3..5e2db39 100644 --- a/R/plot.mkinfit.R +++ b/R/plot.mkinfit.R @@ -28,7 +28,8 @@ plot.mkinfit <- function(x, fit = x, col_obs = 1:length(fit$mkinmod$map), pch_obs = col_obs, lty_obs = rep(1, length(fit$mkinmod$map)), - add = FALSE, legend = !add, ...) + add = FALSE, legend = !add, + lpos = "topright", inset = c(0.05, 0.05), ...) { solution_type = fit$solution_type parms.all <- c(fit$bparms.optim, fit$bparms.fixed) @@ -63,7 +64,7 @@ plot.mkinfit <- function(x, fit = x, } matlines(out$time, out[-1], col = col_obs, lty = lty_obs) if (legend == TRUE) { - legend("topright", inset=c(0.05, 0.05), legend=names(fit$mkinmod$map), + legend(lpos, inset= inset, legend=names(fit$mkinmod$map), col=col_obs, pch=pch_obs, lty=lty_obs) } } diff --git a/man/plot.mkinfit.Rd b/man/plot.mkinfit.Rd index 7c23eb8..8678afe 100644 --- a/man/plot.mkinfit.Rd +++ b/man/plot.mkinfit.Rd @@ -13,7 +13,7 @@ xlim = range(fit$data$time), ylim = c(0, max(fit$data$observed, na.rm = TRUE)), col_obs = 1:length(fit$mkinmod$map), pch_obs = col_obs, lty_obs = rep(1, length(fit$mkinmod$map)), - add = FALSE, legend = !add, ...) + add = FALSE, legend = !add, lpos = "topright", inset = c(0.05, 0.05), ...) } \arguments{ \item{x}{ @@ -49,6 +49,12 @@ \item{legend}{ should a legend be added to the plot? } + \item{lpos}{ + position of the legend. Passed to \code{\link{legend}} as the first argument. +} + \item{inset}{ + Passed to \code{\link{legend}} if applicable. +} \item{\dots}{ further arguments passed to \code{\link{plot}}. } |