Rev 28 | Rev 51 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
.bdcalcsizes <- function(paper=bdp()$paper,mfrow=c(1,1),scaleheight=1)
{
## scaleheight is kind of a hack. We need to be able to the height
## without using mfrow. This is for sharing the x axis between
## plots.
prm <- bdp()
paperpars <- prm[[paper]]
### columns, half, quadratic er levn fra et gammelt hack. skal erstattes med skabeloner.
### columns <- 1
### half <- FALSE
### quadratic <- FALSE
### first, the height
## should switch be used?
if(any(mfrow<1)){
stop("Both elements in bdp()$mfrow must be positive. Exiting...")
}
if(mfrow[1]*scaleheight<=4){
bdp(height=mfrow[1]*scaleheight*paperpars$height)
} else {
bdp(height=paperpars$height.full)
}
### then the width
bdp(width=paperpars$width)
bdp(size.unit=paperpars$size.unit)
}
## ### first, the height
## if(mfrow[1]==1){
## bdp(height=paperpars$height)
## } else if(mfrow[1]<4){
## #### en graf fylder 1/3, 4 graf fylder det hele
## r <- (3/4)^(1/3)
## bdp(height=mfrow[1]*1/3*paperpars$height.full*r^(mfrow[1]-1))
## } else {
## bdp(height=paperpars$height.full)
## }