Subversion Repositories bdplot

Rev

Rev 25 | Rev 47 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 pdel 1
.bdcalcsizes <- function(paper=bdp()$paper,mfrow=c(1,1))
2
  {
3
    prm <- bdp()
4
    paperpars <- prm[[paper]]
5
### columns, half, quadratic er levn fra et gammelt hack. skal erstattes med skabeloner.
25 pdel 6
###    columns <- 1
7
###    half <- FALSE
8
###    quadratic <- FALSE
5 pdel 9
 
10
### first, the height
28 pdel 11
    ## should switch be used?
12
    if(any(mfrow<1)){
13
      stop("Both elements in bdp()$mfrow must be positive. Exiting...")
14
    }
15
 
16
    if(mfrow[1]<=4){    
17
      bdp(height=mfrow[1]*paperpars$height)    
5 pdel 18
    } else {
15 pdel 19
      bdp(height=paperpars$height.full)
5 pdel 20
    }
21
 
22
### then the width
28 pdel 23
      bdp(width=paperpars$width)
24
      bdp(size.unit=paperpars$size.unit)
25
 
26
 
5 pdel 27
  }
28 pdel 28
 
29
## ### first, the height
30
##     if(mfrow[1]==1){
31
##       bdp(height=paperpars$height)
32
##     } else if(mfrow[1]<4){
33
## #### en graf fylder 1/3, 4 graf fylder det hele
34
##       r <- (3/4)^(1/3)
35
##       bdp(height=mfrow[1]*1/3*paperpars$height.full*r^(mfrow[1]-1))
36
##     } else {
37
##       bdp(height=paperpars$height.full)
38
##     }