chart_xts2y | R Documentation |
Plot two xts time series with two y-axes in an x11 window.
chart_xts2y(xtsv, color = "red", x11 = TRUE, ...)
xtsv |
An xts time series with two columns. |
color |
A string specifying the color of the second line and
axis (default is |
x11 |
A Boolean argument: if |
... |
Additional arguments to function |
The function chart_xts2y()
creates a plot of two xts
time series with two y-axes.
By default chart_xts2y()
opens and plots in an x11 window.
The function chart_xts2y()
uses the standard plotting functions from
base R, and the function plot.zoo()
from package
zoo.
The xtsv column names returned invisibly, and a plot in an x11 window produced as a side effect.
# Plot two time series
rutils::chart_xts2y(cbind(quantmod::Cl(rutils::etfenv$VTI),
quantmod::Cl(rutils::etfenv$IEF))["2015"])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.