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= "months", lab.tstep= "years", lab.fmt,
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, lband, uband, and sim (when provided).
If dates is a factor or character vector, its values are cal.ini and val.ini. See format in as.Date.
Default value is %Y-%m-%dgof.leg=TRUE. Decimal places used for rounding the goodness-of-fit indexeslegend is a character vector, the first element is used for labelling the observed series, the second for labelling the polygon. Color to be used for filling the area between the lower and upper uncertainty bound.polygon. The color to draw the border. The default, 'NULL', means to use 'par("fg")'. Use 'border = NA' to omit borders.format in as.Date. If not specified, it will try "%Y-%m-%d" when lab.tstep=="days", plot.default.x and sim ts.plot.default. The line width, see 'par'.plot.default. The line type, see 'par'.x and y. (e.g.: 1: white circle; 9: white rhombus with a cross inside)x, or from other methodspfactor, rfactor# Loading daily streamflows of the Ega River (Spain), from 1961 to 1970
require(zoo)
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
plotbands(obs, lband, uband)
# Randomly generating a simulated time series
sim <- obs + rnorm(length(obs), mean=3)
plotbands(obs, lband, uband, sim)Run the code above in your browser using DataLab