plot.Rd 2.62 KB
Newer Older
unknown's avatar
unknown committed
1
\encoding{UTF-8}
2
3
\name{plot}
\alias{plot}
4
\alias{plot.PrepGR}
5
6
\alias{plot.CalGR}
\alias{plot.SimGR}
7
8


9
\title{Static plots for time series of PrepGR, CalGR and SimGR objects}
unknown's avatar
unknown committed
10
11


12
13
14
\description{
Static plots for time series of \emph{PrepGR}, \emph{CalGR} and \emph{SimGR} objects. 
Also plot of the evolution  of parameters and objective function during the calibration step for CalGR object.}
15
16


unknown's avatar
unknown committed
17
\usage{
18
19
20
21
22
23
24
25
26
27
\method{plot}{PrepGR}(x, type = "l",
     col.Precip = "royalblue", col.Q = "black", col.na = "grey",
     xlab = NULL, ylab = NULL, main = NULL,
     plot.na = TRUE, ...)
  
\method{plot}{CalGR}(x, xlab = NULL, ylab = NULL, main = NULL,
     which = c("perf", "iter", "ts"), ...)

\method{plot}{SimGR}(x, ...)
  
unknown's avatar
unknown committed
28
29
30
31
}


\arguments{
32
  \item{x}{[PrepGR], [CalGR] or [SimGR] containing the vector of dates (\emph{POSIXt}) and the time series of numeric values list perturbed inputs and DA model outputs (see \code{\link{PrepGR}}, \code{\link{CalGR}} and \code{\link{SimGR}})}
unknown's avatar
unknown committed
33
  
34
  \item{type}{[character] the type of plot that should be drawn (see \code{\link[graphics]{plot}} for details)}
unknown's avatar
unknown committed
35
  
36
  \item{col.Precip}{(optional) [character]color code or name for precipitation, see \code{\link[graphics]{par}}}
unknown's avatar
unknown committed
37
  
38
  \item{col.Q}{(optional) [character] color code or name for observed flow, see \code{\link[graphics]{par}}}
unknown's avatar
unknown committed
39
  
40
  \item{col.na}{(optional) [character] color code or name for missing values, see \code{\link[graphics]{par}}}
unknown's avatar
unknown committed
41
  
42
  \item{xlab}{(optional) [character] a label for the x-axis (see \code{\link[graphics]{title}})}
unknown's avatar
unknown committed
43
  
44
  \item{ylab}{(optional) [character] a label for the y-axis (vector of 1 or 2 values for rainfall and flow respectively; see \code{\link[graphics]{title}})}
unknown's avatar
unknown committed
45
  
46
  \item{main}{(optional) [character] a main title for the plot (see \code{\link[graphics]{title}})}
unknown's avatar
unknown committed
47
  
48
  \item{plot.na}{[boolean] boolean indicating if the missing values are plotted on the x-axis}
unknown's avatar
unknown committed
49
  
50
  \item{which}{[character] choice of the plot type (\code{"perf"} (default): plot diagnostics; \code{"iter"}: parameter and calibration criterion values during the iterations of the steepest descent step of the airGR calibration algorithm; \code{"ts"}: time series of observed precipitation and observed and simulated flows)}
51
52
  
  \item{...}{other parameters to be passed through to plotting functions}
unknown's avatar
unknown committed
53
54
55
56
}


\seealso{
57
\code{\link{PrepGR}}
unknown's avatar
unknown committed
58
59
60
61
62
63
}


\author{Olivier Delaigue}

\examples{
64
library(airGRteaching)
unknown's avatar
unknown committed
65
66

## data.frame of observed data
67
data(L0123001, package = "airGR")
unknown's avatar
unknown committed
68
69
70
BasinObs2 <- BasinObs[, c("DatesR", "P", "E", "Qmm", "T")]

## Preparation of observed data for modelling
71
PREP <- PrepGR(ObsDF = BasinObs2, HydroModel = "GR4J", CemaNeige = FALSE)
unknown's avatar
unknown committed
72
73

## Observed data plotting
74
plot(PREP)
unknown's avatar
unknown committed
75
76
}