diff --git a/DESCRIPTION b/DESCRIPTION index 5916662a14834265bcda530ba85e833fbbc731b4..9a32e72be6e53b2c2566e4115925fa83d350ac32 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: airGR Type: Package Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling -Version: 1.2.16.10 +Version: 1.2.16.11 Date: 2019-06-06 Authors@R: c( person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), diff --git a/NEWS.rmd b/NEWS.rmd index dfc54cc188c6c8b2fbbe95096f4bdbdf51361626..c0f9e0b3afe833239dcb2b7bd541ba461d1a6d9d 100644 --- a/NEWS.rmd +++ b/NEWS.rmd @@ -13,7 +13,8 @@ output: -6-065-23) + +### 1.2.16.11 Release Notes (2019-06-06) #### New features diff --git a/R/plot.OutputsModel.R b/R/plot.OutputsModel.R index 66c61b8164f5edd9077250a2d5300f78690f131a..e87e934f66cfb671cd53040d2b9c3d050fa9fec2 100644 --- a/R/plot.OutputsModel.R +++ b/R/plot.OutputsModel.R @@ -594,19 +594,22 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = if (BOOLPLOT_Error) { kPlot <- kPlot + 1 mar <- c(3, 5, 1, 5) - plotunitError <- "[-]" - errorQ <- OutputsModel$Qsim / Qobs + if (log_scale) { + errorQ <- log(OutputsModel$Qsim) - log(Qobs) + } else { + errorQ <- OutputsModel$Qsim - Qobs + } par(new = FALSE, mar = mar) ylim1 <- range(errorQ[IndPeriod_Plot], na.rm = TRUE) plot(Xaxis, errorQ[IndPeriod_Plot], type = "l", xaxt = "n", yaxt = "n", ylim = ylim1, col = "grey50", lwd = lwd * lwdk, - xlab = "", ylab = "", log = ifelse(log_scale, "y", ""), - panel.first = abline(h = 1, col = "grey", lty = 2), ...) + xlab = "", ylab = "", + panel.first = abline(h = 0, col = "grey"), ...) axis(side = 2, at = pretty(ylim1), labels = pretty(ylim1), cex.axis = cex.axis, ...) - mtext(side = 2, paste("flow err.", plotunitError), cex = cex.lab, line = line) + mtext(side = 2, paste("flow error", plotunit), cex = cex.lab, line = line) if (BOOL_Dates) { axis(side = 1, at = Seq1, labels = FALSE, cex.axis = cex.axis, ...) axis(side = 1, at = Seq2, labels = Labels2, lwd.ticks = 1.5, cex.axis = cex.axis, ...)