Commit 8ec631c9 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.16.16 NEW: Error plot of plot.OutputsModel fun now runs with log_scale arg

Showing with 9 additions and 8 deletions
+9 -8
Package: airGR Package: airGR
Type: Package Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.16.15 Version: 1.2.16.16
Date: 2019-06-06 Date: 2019-06-06
Authors@R: c( Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")), person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
...@@ -14,7 +14,7 @@ output: ...@@ -14,7 +14,7 @@ output:
### 1.2.16.15 Release Notes (2019-06-06) ### 1.2.16.16 Release Notes (2019-06-06)
#### New features #### New features
......
...@@ -586,14 +586,13 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ...@@ -586,14 +586,13 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
mar <- c(3, 5, 1, 5) mar <- c(3, 5, 1, 5)
if (log_scale) { if (log_scale) {
errorQ <- log(OutputsModel$Qsim) - log(Qobs) errorQ <- log(OutputsModel$Qsim[IndPeriod_Plot]) - log(Qobs[IndPeriod_Plot])
} else { } else {
errorQ <- OutputsModel$Qsim - Qobs errorQ <- OutputsModel$Qsim[IndPeriod_Plot] - Qobs[IndPeriod_Plot]
} }
par(new = FALSE, mar = mar) par(new = FALSE, mar = mar)
ylim1 <- range(errorQ[IndPeriod_Plot], na.rm = TRUE) ylim1 <- range(errorQ[SelectNotZero], na.rm = TRUE)
plot(Xaxis, errorQ,
plot(Xaxis, errorQ[IndPeriod_Plot],
type = "l", xaxt = "n", yaxt = "n", ylim = ylim1, type = "l", xaxt = "n", yaxt = "n", ylim = ylim1,
col = par("fg"), lwd = lwd * lwdk, col = par("fg"), lwd = lwd * lwdk,
xlab = "", ylab = "", xlab = "", ylab = "",
...@@ -606,6 +605,9 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ...@@ -606,6 +605,9 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
} else { } else {
axis(side = 1, at = pretty(Xaxis), labels = pretty(Xaxis), cex.axis = cex.axis, ...) axis(side = 1, at = pretty(Xaxis), labels = pretty(Xaxis), cex.axis = cex.axis, ...)
} }
if (log_scale) {
legend("bottomright", "log scale", lty = 1, col = NA, bty = "o", bg = bg, box.col = bg, cex = cex.leg)
}
} }
...@@ -782,7 +784,6 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea = ...@@ -782,7 +784,6 @@ plot.OutputsModel <- function(x, Qobs = NULL, IndPeriod_Plot = NULL, BasinArea =
} }
## Cumulative_frequency ## Cumulative_frequency
if (BOOLPLOT_CumFreq) { if (BOOLPLOT_CumFreq) {
kPlot <- kPlot + 1 kPlot <- kPlot + 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment