Subversion Repositories bdplot

Rev

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

#################################################
  ## this should start by determining paper size \showthe\textwidth is
  ##  useful in latex to determine what width to use.


#### All measures MUST be given in inches!!
## A complete template consists of:
## width: width of a figure (same as paperwidth?)
## height: height of figure
## height.paper: full paper height.
## size.unit: 

.bdpapertemplates <- function(){
  bdpars <- list()

  bdpars$a4.word <- list(
### According to word 2003, the default width for word is 21cm - 2*3.17cm = 14.66cm
                         width = 14.66,
                         height.paper = (29.7-2.54*2),
##                         height = 3.230971,
                         height = (29.7-2.54*2)/3,
                         size.unit="cm"
                         )
  
### b5 is set up for the IMM phd thesis template
  bdpars$b5=list(
    width=4.782,
    height=2.7,
    height.full=NA,
    size.unit="in"
    )
  
  
  
  
#### these derivates from b5 will also be relevant for a4 etc. They could be calculated automatically if ie bdp()$half==TRUE.
 
      ## 2.354 works like a charm as it is with two subfigures next
      ## to each other
  bdpars$b5.half = list(
    width = 2.354,
    ## When the plots are narrower, it looks weird if they are not
    ## "less high" too.
    height = 2.15)
  
  
  
  bdpars$b5.quadratic = list(
    width = bdpars$b5$width,
        height = bdpars$b5$width)

  bdpars
  
}
  
### should this be done, if half==TRUE?
### prm$mar.lab <-  mar.lab.half


#### leftovers from the design from PB Plotting. Can probably be used for the a4 template.
##   else if(prm$paper == "a4"){
##       if  (all(mfrow==c(1,1)) & columns==1 & prm$paper == "a4"){
##         prm$width <- 6
##         prm$height <- 2.2
##       }
##       else {
## #################################################        
##         if( all(mfrow==c(2,1)) & columns==1)
##           {
##             prm$width <- 6
##             prm$height <- 3.5
##           }
## #################################################
##         if( all(mfrow==c(3,1)) & columns==1)
##           {
##             prm$width <- 6
##             prm$height <- 4.5
##           }
## #################################################
##         if( all(mfrow==c(4,1)) & columns==1)
##           {
##             prm$width <- 6
##             prm$height <- 5.5
##         }
## #################################################
##       if( all(mfrow==c(1,2)) & columns==1)
##         {
##           prm$width <- 6
##           prm$height <- 2.5
##         }
##       }     
## #################################################
##     }
##     prm$mfrow <- mfrow
    
    
##     prm
##   }