Skip to content
Prev 78411 / 398502 Next

multiple line plots

Assuming, as in your example, that you want to plot your
series against 1, 2, 3, ...  first form a ts series, my.series,
and then plot it using the col= argument:

	my.series <- do.call("cbind", lapply(tpos, ts))
	m <- ncol(my.series)
	ts.plot(my.series, col = 1:m)

Another possibility is to use col = rainbow(m) in the last line.
On 10/5/05, sosman <sourceforge at metrak.com> wrote: