plotEvents {hydroEvents} | R Documentation |
Plot Events
Description
Wrapper function for plotting identified events.
Usage
plotEvents(
data,
dates = NULL,
events,
type = "lineover",
colline = "red",
colpnt = "blue",
colbound = "red",
ymin = min(data),
ymax = max(data),
xlab = "",
ylab = "",
main = "events"
)
Arguments
data |
The data vector |
dates |
Optional date vector |
events |
Events data frame |
type |
The type of plot (see details) |
colline |
Line colour |
colpnt |
Point colour |
colbound |
Background colour for plot type |
ymin |
Minimum plot extend in vertical direction |
ymax |
Maximum plot extent in vertical direction |
xlab |
x-axis label |
ylab |
y-axis label |
main |
Plot title |
Details
Three plot types are implemented: "lineover"
, "bound"
, "hyet"
. See examples.
If events contains a column titled "which.max" the maxima are also plotted.
Value
No return value.
See Also
eventBaseflow
eventMaxima
eventMinima
eventPOT
Examples
# Plot events
library(hydroEvents)
BFI_res = eventBaseflow(dataBassRiver)
oldpar <- par(mfrow = c(3, 1), mar = c(3, 2.7, 2, 1))
d = as.Date("1974-06-30") + 0:(length(dataBassRiver)-1)
plotEvents(data = dataBassRiver, dates = d, events = BFI_res,
type = "lineover", xlab = "Date", ylab = "Flow (ML/day)", main = "lineover")
plotEvents(data = dataBassRiver, dates = d, events = BFI_res, type = "bound",
xlab = "Date", ylab = "Flow (ML/day)", main = "bound")
plotEvents(data = dataBassRiver, dates = d, events = BFI_res, type = "hyet",
xlab = "Date", ylab = "Flow (ML/day)", main = "hyet")
par(oldpar)
[Package hydroEvents version 0.11 Index]