dyplot {airGRteaching}R Documentation

Interactive plots for time series of PrepGR, CalGR and SimGR objects

Description

Interactive plots for time series of PrepGR, CalGR and SimGR objects.

Usage

## Default S3 method:
dyplot(x, Qsup = NULL, Qsup.name = "Qsup",
       col.Precip = c("royalblue", "lightblue"),
       col.Q = c("black", "orangered", "grey"), col.na = "lightgrey",
       ylab = NULL, main = NULL,
       plot.na = TRUE, RangeSelector = TRUE, Roller = FALSE,
       LegendShow = c("follow", "auto", "always", "onmouseover", "never"), ...)

Arguments

x

[PrepGR], [CalGR] or [SimGR] containing the vector of dates (POSIXt) and the time series of numeric values list perturbed inputs and DA model outputs (see PrepGR, CalGR and SimGR)

Qsup

(optional) [numeric] additional time series of flows (at the same time step than argument x) [mm/time step]

Qsup.name

(optional) [character] a label for the legend of Qsup

col.Precip

(optional) [character] vector of 1 (total precip.) or 2 (liquid and solid precip. with CemaNeige) color codes or names for precipitation (these can be of the form "#AABBCC" or "rgb(255, 100, 200)" or "yellow"), see par and rgb

col.Q

(optional) [character] vector of up to 3 color codes or names for observed (first value), simulated (second value, if provided) and additional (last value, if provided) flows, respectively (these can be of the form "#AABBCC" or "rgb(255, 100, 200)" or "yellow"), see par and rgb

col.na

(optional) [character] color code or name for missing values(these can be of the form "#AABBCC" or "rgb(255, 100, 200)" or "yellow"), see par and rgb

ylab

(optional) [character] a label for the y-axis (flow and precipitation)

main

(optional) [character] a main title for the plot

plot.na

[boolean] indicating if the missing values are plotted on the x-axis

RangeSelector

(optional) [boolean] add a range selector to the bottom of the chart that allows users to pan and zoom to various date ranges (see dyRangeSelector)

Roller

(optional) [numeric] number of time scale units (e.g. days, months, years) to average values over (see dyRoller)

LegendShow

(optional) [character] when to display the legend. Specify "always" to always show the legend. Specify "onmouseover" to only display it when a user mouses over the chart. Specify "follow" (default) to have the legend show as overlay to the chart which follows the mouse. See dyLegend

...

other parameters to be passed through to plotting functions

Author(s)

Olivier Delaigue

See Also

airGRteaching static plot functions

PrepGR, CalGR, SimGR

Examples

library(airGRteaching)

## data.frame of observed data
data(L0123001, package = "airGR")
BasinObs2 <- BasinObs[, c("DatesR", "P", "E", "Qmm", "T")]

## Preparation of observed data for modelling
PREP <- PrepGR(ObsDF = BasinObs2, HydroModel = "GR4J", CemaNeige = FALSE)
dyplot(PREP, main = "Observation")

## Calibration step
CAL <- CalGR(PrepGR = PREP, CalCrit = "KGE2",
             WupPer = NULL, CalPer = c("1990-01-01", "1993-12-31"))
dyplot(CAL, main = "Calibration")

## Simulation
SIM <- SimGR(PrepGR = PREP, CalGR = CAL, EffCrit = "KGE2",
             WupPer = NULL, SimPer = c("1994-01-01", "1998-12-31"))
dyplot(SIM, main = "Simulation")

[Package airGRteaching version 0.2.11 Index]