aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2021-01-25 14:45:04 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2021-01-25 14:45:04 +0100
commit737fc7f352bbb853b01ff6e3c6ec21a528da901e (patch)
tree52b17ee5c0000de32d64dc3d4c4a8175868c78b3 /R
parent9756a9e7e7911caf97bc6a1533926e4e6a58ceda (diff)
Change default ylab in plot.mkinfit, explicit ylab for plot.mmkin
See NEWS.md. Closes #12
Diffstat (limited to 'R')
-rw-r--r--R/plot.mkinfit.R2
-rw-r--r--R/plot.mmkin.R6
2 files changed, 5 insertions, 3 deletions
diff --git a/R/plot.mkinfit.R b/R/plot.mkinfit.R
index 6ac4e45d..9dbc91d7 100644
--- a/R/plot.mkinfit.R
+++ b/R/plot.mkinfit.R
@@ -91,7 +91,7 @@ utils::globalVariables(c("type", "variable", "observed"))
#' @export
plot.mkinfit <- function(x, fit = x,
obs_vars = names(fit$mkinmod$map),
- xlab = "Time", ylab = "Observed",
+ xlab = "Time", ylab = "Residue",
xlim = range(fit$data$time),
ylim = "default",
col_obs = 1:length(obs_vars),
diff --git a/R/plot.mmkin.R b/R/plot.mmkin.R
index 0523e4d3..f8ed1f9a 100644
--- a/R/plot.mmkin.R
+++ b/R/plot.mmkin.R
@@ -15,6 +15,7 @@
#' @param resplot Should the residuals plotted against time, using
#' \code{\link{mkinresplot}}, or as squared residuals against predicted
#' values, with the error model, using \code{\link{mkinerrplot}}.
+#' @param ylab Label for the y axis.
#' @param standardized Should the residuals be standardized? This option
#' is passed to \code{\link{mkinresplot}}, it only takes effect if
#' `resplot = "time"`.
@@ -55,6 +56,7 @@
#' @export
plot.mmkin <- function(x, main = "auto", legends = 1,
resplot = c("time", "errmod"),
+ ylab = "Residue",
standardized = FALSE,
show_errmin = TRUE,
errmin_var = "All data", errmin_digits = 3,
@@ -117,9 +119,9 @@ plot.mmkin <- function(x, main = "auto", legends = 1,
fit <- x[[i.fit]]
if (ymax == "auto") {
- plot(fit, legend = legends == i.fit, ...)
+ plot(fit, legend = legends == i.fit, ylab = ylab, ...)
} else {
- plot(fit, legend = legends == i.fit, ylim = c(0, ymax), ...)
+ plot(fit, legend = legends == i.fit, ylim = c(0, ymax), ylab = ylab, ...)
}
title(main, outer = TRUE, line = -2)

Contact - Imprint