diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2016-06-27 10:02:49 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2016-06-27 10:02:49 +0200 |
commit | b14fe21e176f523e800793102fb5634e468b3165 (patch) | |
tree | a67888ca4da48f0ce191a23be706268e104aa01e /R/plot.mmkin.R | |
parent | 43c0ae8431440bab723b35909d43f51434288c33 (diff) |
Show chi2 in plot.mkinfit, round with signif
Diffstat (limited to 'R/plot.mmkin.R')
-rw-r--r-- | R/plot.mmkin.R | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/R/plot.mmkin.R b/R/plot.mmkin.R index 2cbb4a79..7de91e3e 100644 --- a/R/plot.mmkin.R +++ b/R/plot.mmkin.R @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License along with # this program. If not, see <http://www.gnu.org/licenses/> -plot.mmkin <- function(x, main = "auto", legends = 1, errmin_var = "All data", errmin_digits = 2, +plot.mmkin <- function(x, main = "auto", legends = 1, errmin_var = "All data", errmin_digits = 3, cex = 0.7, rel.height.middle = 0.9, ...) { n.m <- nrow(x) n.d <- ncol(x) @@ -79,10 +79,9 @@ plot.mmkin <- function(x, main = "auto", legends = 1, errmin_var = "All data", e datasets = colnames(x)[i.fit], none = "") - if (!is.null(errmin_var)) { - chi2 <- paste0(round(100 * mkinerrmin(fit)[errmin_var, "err.min"], errmin_digits), "%") - mtext(bquote(.(fit_name) ~ chi^2 ~ "error level" == .(chi2)), cex = cex, line = 0.4) - } + chi2 <- paste0(signif(100 * mkinerrmin(fit)[errmin_var, "err.min"], errmin_digits), "%") + mtext(bquote(.(fit_name) ~ chi^2 ~ "error level" == .(chi2)), cex = cex, line = 0.4) + mkinresplot(fit, legend = FALSE, ...) mtext(paste(fit_name, "residuals"), cex = cex, line = 0.4) } |