addEventLines: Add vertical lines to an existing xts plot

Description Usage Arguments Author(s)

Description

Add vertical lines to an existing xts plot

Usage

1
2
addEventLines(event.dates, event.labels = NULL, date.format = "%Y-%m-%d",
  main = "", on = NA, lty = 1, lwd = 1, col = 1, ...)

Arguments

event.dates

character vector of dates. Vertical lines will be drawn to indicate that an event happened during that time period. event.lines should be a vector of dates (e.g., c("09/03","05/06")) formatted the same as date.format. This function matches the re-formatted row names (dates) with the events.list, so to get a match the formatting needs to be correct.

event.labels

character vector of event labels corresponding to event.dates. This will apply text labels (e.g., c("This Event", "That Event") to the vertical lines drawn.

date.format

format for the dates in event.lines.

main

main title for a new panel if drawn.

on

panel number to draw on. A new panel will be drawn if on=NA.

lty

set the line type, same as in plot.

lwd

set the line width, same as in plot.

col

color palette to use, set by default to rational choices.

...

any other passthrough parameters. Not currently used.

Author(s)

Ross Bennett



Search within the xts package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.