Plot Multiple Time Series

DESCRIPTION:
Plots one or more time series on the current graphics device.

USAGE:
ts.plot(..., abb = T, type = "l", lty = 1:8, pch = 0:18, col = 1:4,
        xlab = <<see below>>, ylab = "",
        xlim = <<see below>>, ylim = <<see below>>)
ts.lines(..., type = "l", lty = 1:8, pch = 0:18, col = 1:4)
ts.points(..., type = "p", lty = 1:8, pch = 0:18, col = 1:4)

REQUIRED ARGUMENTS:
...:
any number of univariate or multivariate time series.

OPTIONAL ARGUMENTS:
abb:
logical flag: if TRUE, labels for times series with calendar time domains are abbreviated.
type:
character string with letters from the set {"p", "l", "b", "o", "n", "h"}, telling which type of plot (points, lines, both, overlaid, none or high-density) should be done for each channel. The first character of type defines the first plot, the second character the second, etc. Characters in type are used cyclically; e.g., "pl"alternately plots points and lines. Default is "l" for ts.plot and ts.lines, "p" for ts.points.
lty:
vector of integers indicating line types. The first element is the line type for the first line, etc. Line types are used cyclically until all plots are drawn. Default is 1:8. Some devices have fewer than eight line types.
pch:
character string or integer vector of plotting characters. The first character is the plotting character for the first plot of type "p", the second for the second, etc. Default is 0:18. To mix special plotting symbols (those specified by integers) and plotting characters, either use character escapes, for example, pch="X\002", or figure out the numeric equivalent of the ASCII character after current, for example, pch=c(88,2).
col:
vector of colors. Colors are also used cyclically if available. Default is 1:4.
xlab:
label for the horizontal axis (ts.plot only). The default is to use the time units of the series, if any, otherwise the string "time". Use "" if no label is desired.
ylab:
label for the vertical axis (ts.plot only). Default is to leave it unlabeled.
xlim:
approximate minimum and maximum values to be put on the horizontal axis (ts.plot only). Warnings are printed if values exceed these limits. Default is the min and max of the union of the time values for all series.
ylim:
approximate minimum and maximum values to be put on the vertical axis. (ts.plot only). Warnings are printed if values exceed these limits. Default is the min and max of the union of the observation values for all series.

SIDE EFFECTS:
The ts.plot function generates a new graphic with the values of each series or component sub-series plotted against the observation time; ts.points and ts.lines add to the current graphic.

DETAILS:
When the list of time-series arguments supplied to ts.plot includes both regular and calendar time series, the calendar time series are treated as regular (class "rts"), using the function as.rts to do the conversion. No conversion is applied to irregular calendar time series. Since ts.lines and ts.points have no way of knowing what types of series are supplied to ts.points, it is possible that the result of calling ts.plot followed by ts.lines and/or ts.points might be different from what would be obtained if all the arguments were given initially to ts.plot.

Other high-level graphical parameters may also be supplied as arguments to this function, in particular the arguments to title (see par).

Factors are ignored in multivariate time series; in univariate time series they are refused.

Because plotting symbols are drawn with lines and because these functions may be changing the line style, you should probably specify lty=1 when using plotting symbols.


SEE ALSO:
lag.plot , par , plot , title , tsplot .