Subversion Repositories bdplot

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pdel 1
#################################################
2
  ## this should start by determining paper size \showthe\textwidth is
3
  ##  useful in latex to determine what width to use.
4
 
5
 
6
#### All measures MUST be given in inches!!
7
## A complete template consists of:
8
## width: width of a figure (same as paperwidth?)
9
## height: height of figure
10
## height.paper: full paper height.
11
## size.unit: 
12
 
13
.bdpapertemplates <- function(){
14
  bdpars <- list()
15
 
16
  bdpars$a4.word <- list(
17
### According to word 2003, the default width for word is 21cm - 2*3.17cm = 14.66cm
18
                         width = 14.66,
19
                         height.paper = (29.7-2.54*2),
20
##                         height = 3.230971,
21
                         height = (29.7-2.54*2)/3,
22
                         size.unit="cm"
23
                         )
24
 
25
### b5 is set up for the IMM phd thesis template
26
  bdpars$b5=list(
27
    width=4.782,
28
    height=2.7,
29
    height.full=NA,
30
    size.unit="in"
31
    )
32
 
33
 
34
 
35
 
36
#### these derivates from b5 will also be relevant for a4 etc. They could be calculated automatically if ie bdp()$half==TRUE.
37
 
38
      ## 2.354 works like a charm as it is with two subfigures next
39
      ## to each other
40
  bdpars$b5.half = list(
41
    width = 2.354,
42
    ## When the plots are narrower, it looks weird if they are not
43
    ## "less high" too.
44
    height = 2.15)
45
 
46
 
47
 
48
  bdpars$b5.quadratic = list(
49
    width = bdpars$b5$width,
50
        height = bdpars$b5$width)
51
 
52
  bdpars
53
 
54
}
55
 
56
### should this be done, if half==TRUE?
57
### prm$mar.lab <-  mar.lab.half
58
 
59
 
60
#### leftovers from the design from PB Plotting. Can probably be used for the a4 template.
61
##   else if(prm$paper == "a4"){
62
##       if  (all(mfrow==c(1,1)) & columns==1 & prm$paper == "a4"){
63
##         prm$width <- 6
64
##         prm$height <- 2.2
65
##       }
66
##       else {
67
## #################################################        
68
##         if( all(mfrow==c(2,1)) & columns==1)
69
##           {
70
##             prm$width <- 6
71
##             prm$height <- 3.5
72
##           }
73
## #################################################
74
##         if( all(mfrow==c(3,1)) & columns==1)
75
##           {
76
##             prm$width <- 6
77
##             prm$height <- 4.5
78
##           }
79
## #################################################
80
##         if( all(mfrow==c(4,1)) & columns==1)
81
##           {
82
##             prm$width <- 6
83
##             prm$height <- 5.5
84
##         }
85
## #################################################
86
##       if( all(mfrow==c(1,2)) & columns==1)
87
##         {
88
##           prm$width <- 6
89
##           prm$height <- 2.5
90
##         }
91
##       }     
92
## #################################################
93
##     }
94
##     prm$mfrow <- mfrow
95
 
96
 
97
##     prm
98
##   }