aboutsummaryrefslogtreecommitdiff
path: root/R/plot.mkinfit.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/plot.mkinfit.R')
-rw-r--r--R/plot.mkinfit.R8
1 files changed, 6 insertions, 2 deletions
diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R
index 31746fb8..f8ee600e 100644
--- a/R/plot.mkinfit.R
+++ b/R/plot.mkinfit.R
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2014 Johannes Ranke
+# Copyright (C) 2010-2015 Johannes Ranke
# Contact: jranke@uni-bremen.de
# This file is part of the R package mkin
@@ -76,7 +76,11 @@ plot.mkinfit <- function(x, fit = x,
}
matlines(out$time, out[obs_vars], col = col_obs[obs_vars], lty = lty_obs[obs_vars])
if (legend == TRUE) {
- legend(lpos, inset= inset, legend = obs_vars,
+ legend_names = lapply(names(fit$mkinmod$spec), function(x) {
+ if (is.na(fit$mkinmod$spec[[x]]$full_name)) x
+ else fit$mkinmod$spec[[x]]$full_name
+ })
+ legend(lpos, inset= inset, legend = legend_names,
col = col_obs[obs_vars], pch = pch_obs[obs_vars], lty = lty_obs[obs_vars])
}
# Show residuals if requested

Contact - Imprint