plotEvents | R Documentation |
Wrapper function for plotting identified events.
plotEvents( data, dates = NULL, events, type = "lineover", colline = "red", colpnt = "blue", colbound = "red", ymin = min(data), ymax = max(data), xlab = "", ylab = "", main = "events" )
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 |
Three plot types are implemented: "lineover"
, "bound"
, "hyet"
. See examples.
If events contains a column titled "which.max" the maxima are also plotted.
No return value.
eventBaseflow
eventMaxima
eventMinima
eventPOT
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.