Commit 5924412f authored by unknown's avatar unknown
Browse files

v0.1.11.8 graphical parameters recorded and executed when the plot.PrepGR,...

v0.1.11.8 graphical parameters recorded and executed when the plot.PrepGR, plot.CalGR and plot.SimGR functions exit
parent a8b7afa3
Package: airGRteaching
Type: Package
Title: Tools to Simplify the Use of the airGR Hydrological Package for Education (Including a Shiny Interface)
Version: 0.1.11.7
Version: 0.1.11.8
Date: 2018-01-29
Authors@R: c(person("Olivier", "Delaigue", role = c("aut", "cre"), email = "airGR@irstea.fr"), person("Laurent", "Coron", role = c("aut")), person("Pierre", "Brigode", role = c("aut")), person("Guillaume", "Thirel", role = c("ctb")))
Depends: airGR (>= 1.0.9.43)
......
......@@ -12,6 +12,9 @@ plot.CalGR <- function(x, xlab = NULL, ylab = NULL, main = NULL, which = c("per
nbParam <- nbParamX + nbParamC
nmParam <- c(sprintf("X%i", 1:nbParamX), sprintf("C%i", seq_len(nbParamC)))
opar <- par(no.readonly = TRUE)
on.exit(par(opar))
if (any(which[1L] %in% c("perf"))) {
plot(x$OutputsModel, Qobs = x$Qobs, ...)
}
......@@ -103,4 +106,5 @@ plot.CalGR <- function(x, xlab = NULL, ylab = NULL, main = NULL, which = c("per
# legend("topright", legend = "NA", pch = 15, col = col.na, bty = "n", cex = 0.8)
# }
}
}
\ No newline at end of file
......@@ -21,6 +21,9 @@ plot.PrepGR <- function(x, type = "l", col.Precip = "royalblue", col.Q = "black"
Precip = x$InputsModel$Precip,
Qobs = x$Qobs)
opar <- par(no.readonly = TRUE)
on.exit(par(opar))
layout(mat = matrix(1:2), widths = c(1, 2), heights = c(1, 2))
par(mar = c(0.1, 4, 4, 2), xaxt = "n")
......
......@@ -4,6 +4,9 @@ plot.SimGR <- function(x, ...) {
stop("Non convenient data for x argument. Must be of class \"SimGR\"")
}
opar <- par(no.readonly = TRUE)
on.exit(par(opar))
plot(x$OutputsModel, Qobs = x$Qobs, ...)
}
\ No newline at end of file
Markdown is supported
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