Commit d4cd8092 authored by Delaigue Olivier's avatar Delaigue Olivier
Browse files

v1.2.16.24 DOC: example added in plot.OutputsModel doc

Showing with 52 additions and 4 deletions
+52 -4
Package: airGR
Type: Package
Title: Suite of GR Hydrological Models for Precipitation-Runoff Modelling
Version: 1.2.16.23
Version: 1.2.16.24
Date: 2019-06-07
Authors@R: c(
person("Laurent", "Coron", role = c("aut", "trl"), comment = c(ORCID = "0000-0002-1503-6204")),
......
......@@ -14,7 +14,7 @@ output:
### 1.2.16.23 Release Notes (2019-06-07)
### 1.2.16.24 Release Notes (2019-06-07)
#### New features
......@@ -34,6 +34,8 @@ output:
- <code>plot.OutputsModel()</code> now allowed new values for the which argument : <code>"all"</code> corresponds to all graphs, <code>"synth"</code> corresponds to the main graphs (by default; corresponding to <code>"all"</code> in the previous versions of the pcakage) (<code>c("Precip", "Temp", "SnowPack", "Flows", "Regime", "CumFreq", "CorQQ")</code>), "ts" corresponds to the time serie graphs (<code>c("Precip", "PotEvap", "Temp", "SnowPack", "Flows")</code>) and <code>"perf"</code> corresponds to the perfomance graphs (<code>c("Error", "Regime", "CumFreq", "CorQQ")</code>).
- An example is addeed to illustred the use of the <code>plot.OutputsModel()</code> function.
#### Minor user-visible changes
......
......@@ -64,7 +64,7 @@ Function which creates a screen plot giving an overview of the model outputs.
\details{
Different types of independent graphs are available (depending on the model):
Different types of independent graphs are available (depending on the model, but always drawn in this order):
\itemize{
\item \code{"Precip"}: time series of total precipitation
\item \code{"PotEvap"}: time series of potential evapotranspiration
......@@ -93,5 +93,51 @@ Laurent Coron, Olivier Delaigue, Guillaume Thirel
\examples{
### See examples of RunModel_GR4J or RunModel_CemaNeigeGR4J functions
### see examples of RunModel_GR4J or RunModel_CemaNeigeGR4J functions
### to understand how the example datasets have been prepared
## loading examples dataset for GR4J and GR4J + CemaNeige
data(plotOutputsModel)
### Qobs and outputs from GR4J and GR4J + CemaNeige models
str(GR4J, max.level = 1)
str(CNGR4J, max.level = 1)
### default dashboard (which = "synth")
## GR models whithout CemaNeige
plot(GR4J$OutputsModel, Qobs = GR4J$Qobs)
## GR models whith CemaNeige ("Temp" and "SnowPack" added)
plot(CNGR4J$OutputsModel, Qobs = CNGR4J$Qobs)
### "Error" and "CorQQ" plots cannot be display whithout Qobs
plot(GR4J$OutputsModel, which = "all", Qobs = GR4J$Qobs)
plot(GR4J$OutputsModel, which = "all", Qobs = NULL)
### complex plot arrangements
plot(GR4J$OutputsModel, Qobs = GR4J$Qobs,
which = c("Flows", "Regime", "CumFreq", "CorQQ"),
LayoutMat = matrix(c(1, 2, 3, 1, 4, 4), ncol = 2),
LayoutWidths = c(1.5, 1),
LayoutHeights = c(0.5, 1, 1))
### add a main title
## the whole list of settable par's
opar <- par(no.readonly = TRUE)
## define outer margins and a title inside it
par(oma = c(0, 0, 3, 0))
plot(GR4J$OutputsModel, Qobs = GR4J$Qobs)
title(main = "GR4J outputs", outer = TRUE, line = 1.2, cex.main = 1.4)
## reset original par
par(opar)
}
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