
Adds uncertainty bounds to an existing plot.
plotbandsonly.RdAdds a polygon representing uncertainty bounds to an existing plot.
Usage
plotbandsonly(lband, uband, dates, date.fmt="%Y-%m-%d",
bands.col="lightblue", border= NA, ...)Arguments
- lband
zoo or xts object with the values of the lower band.
- uband
zoo or xts object with the values of the upper band.
- dates
OPTIONAL. Date, factor, or character object indicating the dates that will be assigned to
lbandanduband.
Ifdatesis a factor or character vector, its values are converted to dates using the date format specified bydate.fmt.
Whenlbandandubandare already of zoo class, the values provided bydatesover-write the original dates of the objects.- date.fmt
OPTIONAL. Character indicating the format of
dates. Seeformatinas.Date.- bands.col
See
polygon. Color to be used for filling the area between the lower and upper uncertainty bound.- border
See
polygon. The color to draw the border. The default, 'NULL', means to use 'par("fg")'. Use 'border = NA' to omit borders.- ...
further arguments passed to the
polygonfunction for plotting the bands, or from other methods
Examples
# 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
if (FALSE) { # \dontrun{
plot(obs, type="n")
plotbandsonly(lband, uband)
points(obs, col="blue", cex=0.6, type="o")
} # }