plotbands | R Documentation |
It plots a ts with observed values and two confidence bounds. Optionally can also add a simulated time series, in order to be compared with 'x'.
plotbands(x, lband, uband, sim,
dates, date.fmt="%Y-%m-%d",
gof.leg= TRUE, gof.digits=2,
legend=c("Obs", "Sim", "95PPU"), leg.cex=1,
bands.col="lightblue", border= NA,
tick.tstep= "auto", lab.tstep= "auto", lab.fmt=NULL,
cal.ini=NA, val.ini=NA,
main="Confidence Bounds for 'x'",
xlab="Time", ylab="Q, [m3/s]", ylim,
col=c("black", "blue"), type= c("lines", "lines"),
cex= c(0.5, 0.5), cex.axis=1.2, cex.lab=1.2,
lwd=c(0.6, 1), lty=c(3, 4), pch=c(1,9), ...)
x |
zoo or xts object with the observed values. |
lband |
zoo or xts object with the values of the lower band. |
uband |
zoo or xts object with the values of the upper band. |
sim |
OPTIONAL. zoo or xts object with the simulated values. |
dates |
OPTIONAL. Date, factor, or character object indicating the dates that will be assigned to |
date.fmt |
OPTIONAL. Character indicating the format in which the dates entered are stored in |
gof.leg |
logical indicating if the p-factor and r-factor have to be computed and plotted as legends on the graph. |
gof.digits |
OPTIONAL, numeric. Only used when |
legend |
OPTIONAL. logical or character vector of length 3 with the strings that will be used for the legend of the plot. |
leg.cex |
OPTIONAL. numeric. Used for the GoF legend. Character expansion factor *relative* to current 'par("cex")'. Used for text, and provides the default for 'pt.cex' and 'title.cex'. Default value is 1. |
bands.col |
See |
border |
See |
tick.tstep |
character, indicating the time step that have to be used for putting the ticks on the time axis. Valid values are: auto, years, months,weeks, days, hours, minutes, seconds. |
lab.tstep |
character, indicating the time step that have to be used for putting the labels on the time axis. Valid values are: auto, years, months,weeks, days, hours, minutes, seconds. |
lab.fmt |
Character indicating the format to be used for the label of the axis. See |
cal.ini |
OPTIONAL. Character with the date in which the calibration period started. |
val.ini |
OPTIONAL. Character with the date in which the validation period started. |
main |
an overall title for the plot: see 'title' |
xlab |
a title for the x axis: see 'title' |
ylab |
a title for the y axis: see 'title' |
ylim |
the y limits of the plot. See |
col |
colors to be used for plotting the |
type |
character. Indicates if the observed and simulated series have to be plotted as lines or points. Possible values are: |
cex |
See code plot.default. A numerical vector giving the amount by which plotting characters and symbols should be scaled relative to the default. |
cex.axis |
magnification of axis annotation relative to 'cex'. |
cex.lab |
Magnification to be used for x and y labels relative to the current setting of 'cex'. See '?par'. |
lwd |
See |
lty |
See |
pch |
numeric, with the type of symbol for |
... |
further arguments passed to the |
It requires the hydroTSM package
Mauricio Zambrano Bigiarini <mzb.devel@gmail.com>
pfactor
, rfactor
# Loading daily streamflows of the Ega River (Spain), from 1961 to 1970
data(EgaEnEstellaQts)
obs <- EgaEnEstellaQts
# Selecting only the daily values belonging to the year 1961
obs <- window(obs, end=as.Date("1961-12-31"))
# Generating the lower and upper uncertainty bounds
lband <- obs - 5
uband <- obs + 5
## Not run:
plotbands(obs, lband, uband)
## End(Not run)
# Randomly generating a simulated time series
sim <- obs + rnorm(length(obs), mean=3)
## Not run:
plotbands(obs, lband, uband, sim)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.