tsplot(..., type="l", lty=1:5, pch=<<see below>>, col=1:4) tspoints(..., type="p", lty=1:5, pch=<<see below>>, col=1:4) tslines(..., type="l", lty=1:5, pch=<<see below>>, col=1:4)
Graphical parameters may also be supplied as arguments to this function (see par). In addition, the high-level graphics arguments described under par and the arguments to title may be supplied to this function.
Note that all series are assumed to be in the same units.
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.
tsplot(gnp, smooth(gnp), type="pl") tspoints(x, y, pch="*") # points with "*" for both series tsplot(hstart, smooth(hstart), type="pl") title(main="Housing Starts", sub="Data and Smoothed Values")sun.agg <- aggregate(sunspots, 1, "mean") par(mar=rep(5, 4)) tsplot(rain.nyc2, ylab="rain in inches") legend(1910, 57, c("rain", "sunspots"), lty=1:2) par(new=T) # trick to add plot with different scale tsplot(window(sun.agg, start(rain.nyc2), end(rain.nyc2)), axes=F, lty=2) axis(4) mtext("mean number of sunspots", side=4, line=3) title(main="New York Rainfall and Sunspot Activity")