Subversion Repositories bdplot

Rev

Rev 62 | Rev 68 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 62 Rev 65
1
 
1
 
2
## so far, there's no end function, so should it just be called bdsharex?
2
## so far, there's no end function, so should it just be called bdsharex?
3
bdsharex.start <- function(nplots){
3
bdsharex.start <- function(nplots,heights=NULL){
-
 
4
  if(!is.null(heights)){
-
 
5
    if(length(heights)!=nplots) stop("If !is.null(heights), heights must be of length nplots.")
-
 
6
  }
4
  layout(1:(nplots+2), heights=c(lcm(0.1), rep(1,nplots), lcm(1)))
7
  layout(1:(nplots+2), heights=c(lcm(0.1), rep(1,nplots), lcm(1)))
5
  ##  bdp(mar.lab=c(0,5,0.1,1),xaxt="n",las=1,mgp=c(3.5, 1, 0))
8
  ##  bdp(mar.lab=c(0,5,0.1,1),xaxt="n",las=1,mgp=c(3.5, 1, 0))
6
  bdp(mar.nolab=c(0,bdp()$mar.nolab[2],0,bdp()$mar.nolab[4]))
9
  bdp(mar.nolab=c(0,bdp()$mar.nolab[2],0,bdp()$mar.nolab[4]))
7
  bdp(mar.lab=c(0,bdp()$mar.lab[2],0,bdp()$mar.lab[4]))
10
  bdp(mar.lab=c(0,bdp()$mar.lab[2],0,bdp()$mar.lab[4]))
8
  
11
  
9
  bdp(xaxt="n",las=1,mgp=c(3.5, 1, 0))
12
  bdp(xaxt="n",las=1,mgp=c(3.5, 1, 0))
10
  bdplot(0, type="n", yaxt="n", bty="n", xlab="", ylab="")
13
  bdplot(0, type="n", yaxt="n", bty="n", xlab="", ylab="")
11
  bdp(mar.nolab=c(0,bdp()$mar.nolab[2],0,bdp()$mar.nolab[4]))
14
  bdp(mar.nolab=c(0,bdp()$mar.nolab[2],0,bdp()$mar.nolab[4]))
12
}
15
}
13
 
16
 
14
bdsharex.end <- function(xlab=bdp()$xlab){
17
bdsharex.end <- function(xlab=bdp()$xlab){
15
  mtext(xlab,1,line=1.5,cex=bdp()$cex.lab*par("cex"))
18
  mtext(xlab,1,line=1.5,cex=bdp()$cex.lab*par("cex"))
16
##  par(bty="n")
19
##  par(bty="n")
17
  oldbdp <- list()
20
  oldbdp <- list()
18
  oldbdp$grid.h <- bdp()$grid.h
21
  oldbdp$grid.h <- bdp()$grid.h
19
  oldbdp$grid.v <- bdp()$grid.v
22
  oldbdp$grid.v <- bdp()$grid.v
20
  bdp(grid.v=NA)
23
  bdp(grid.v=NA)
21
  bdp(grid.h=NA)
24
  bdp(grid.h=NA)
22
  bdp(grid=FALSE)
25
  bdp(grid=FALSE)
23
  bdplot(1,1,type="n",xaxt="n",yaxt="n",bty="n",ylab="",rlab="")
26
  bdplot(1,1,type="n",xaxt="n",yaxt="n",bty="n",ylab="",rlab="")
24
  bdp(grid.h=oldbdp$grid.h,grid.v=oldbdp$grid.v)
27
  bdp(grid.h=oldbdp$grid.h,grid.v=oldbdp$grid.v)
25
}
28
}
26
 
29