Re: [R] plotting several columns of matrix in one graph

2014-04-02 Thread arun
HI, It is better to show a reproducible example using ?dput().  May be this helps: #vector vec1 <- seq(as.Date("2002-01-01"), as.Date("2009-12-31"),by="1 day") #Assuming that length of the vector is the same as ?nrow of matrix. set.seed(532) mat1 <- matrix(cumsum(rnorm(length(vec1)*5)),ncol=5, d

Re: [R] plotting several columns of matrix in one graph

2014-04-02 Thread arun
Hi, May be this helps: library(xts) library(xtsExtra) data(sample_matrix) plot(as.xts(sample_matrix),screens=1) #or library(zoo) plot(as.zoo(sample_matrix), plot.type="single",col=1:ncol(sample_matrix)) You may also check ?matplot A.K. Hi everyone, I have started using R and although I am us