add lines to dygrap plot representing begin and end of events
Source:R/dygraphMain.R
addEventLines.Rd
add lines to dygrap plot representing begin and end of events
Usage
addEventLines(
dygraph,
events,
labels = seq_len(nrow(events)),
color = "red",
labelLoc = "top",
color.begin = color,
color.end = color,
labelLoc.begin = labelLoc,
labelLoc.end = labelLoc,
signalWidth = kwb.event::hsSigWidth(events)
)
Arguments
- dygraph
dygraph object as returned by dygraph
- events
data frame with columns tBeg (begin time) and tEnd (end time) of events to be drawn
- labels
labels given to the events (default:
1:nrow(events)
)- color
color (default: "red")
- labelLoc
"top" or "bottom" (default: "top")
- color.begin
default: same as argument "color"
- color.end
default: same as argument "color"
- labelLoc.begin
default: same as argument "labelLoc"
- labelLoc.end
default: same as argument "labelLoc"
- signalWidth
signal width in seconds = length of time interval that one timestamp in the original data represents, e.g. 300 for 5-minutes-data.