Subversion Repositories bdplot

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15 pdel 1
### a function to plot all columns in a matrix
2
 
3
bdplotmat <- function(x,y=NULL,cols=NULL,...){
4
 
5
  if(is.null(y)){
6
    y <- x
7
    dim.y <- dim(y)
8
    x <- 1:dim.y[1]
9
  } else {
10
    dim.y <- dim(y)
11
  }
12
##  print(dim.y)
13
 
14
  if(is.null(cols))
15
    cols <- 2:(dim.y[2]+1)
16
##  print(cols)
17
 
18
 
19
  bdplot(x,y[,1],ylim=range(y),col=cols[1],...)
20
 
21
  if(dim.y[2]>1){
22
 
23
    for (i in 2:dim.y[2]){
24
      bdxyadd(x,y[,i],col=cols[i],...)
25
    }
26
 
27
  }
28
 
29
}
30
 
31