Re: [R] plotting 2 time series data on the same graph

2013-05-04 Thread arun
mplete.cases(res),] #install.packages("xtsExtra", repos='http://r-forge.r-project.org') library(xtsExtra) plot(res,screens=1,main="Time Series") plot(res1,col=c(1,3)) A.K. - Original Message ----- From: Rui Barradas To: Preetam Pal Cc: r-help@r-project.org Sent:

Re: [R] plotting 2 time series data on the same graph

2013-05-04 Thread Rui Barradas
Hello, I forgot a third possibility plot(as.ts(cbind(x, y)), plot.type = "single", col = 1:2) Rui Barradas Em 04-05-2013 10:37, Rui Barradas escreveu: Hello, Where is the reproducible example? See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Any

Re: [R] plotting 2 time series data on the same graph

2013-05-04 Thread Rui Barradas
Hello, Where is the reproducible example? See http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example Anyway, see if this does what you need. set.seed(1) x <- cumsum(rnorm(100)) y <- cumsum(rnorm(100)) ylm <- range(c(x, y)) plot(as.ts(x), ylim = ylm) lines(y, co