Subversion Repositories bdplot

Rev

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

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