| addEventLines | R Documentation | 
Add vertical lines and labels to an existing xts plot.
addEventLines(events, main = "", on = 0, lty = 1, lwd = 1, col = 1, ...)
events | 
 An xts object of events and their associated labels. It is
ensured that the first column of   | 
main | 
 Main title for a new panel, if drawn.  | 
on | 
 Panel number to draw on. A new panel will be drawn if   | 
lty | 
 Set the line type, same as in   | 
lwd | 
 Set the line width, same as in   | 
col | 
 Color palette to use, set by default to rational choices.  | 
... | 
 Any other passthrough parameters to   | 
Ross Bennett
## Not run: 
library(xts)
data(sample_matrix)
sample.xts <- as.xts(sample_matrix)
events <- xts(letters[1:3], 
              as.Date(c("2007-01-12", "2007-04-22", "2007-06-13")))
plot(sample.xts[,4])
addEventLines(events, srt = 90, pos = 2)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.