Subversion Repositories bdplot

Rev

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

Rev Author Line No. Line
1 pdel 1
\name{bdinit}
2
\alias{bdinit}
3
%- Also NEED an '\alias' for EACH other topic documented here.
4
\title{ ~~function to do ... ~~ }
5
\description{
6
  ~~ A concise (1-5 lines) description of what the function does. ~~
7
}
8
\usage{
9
bdinit(mfrow = c(1, 1), columns = 1, half = FALSE, quadratic = FALSE)
10
}
11
%- maybe also 'usage' for other objects documented here.
12
\arguments{
13
  \item{mfrow}{ ~~Describe \code{mfrow} here~~ }
14
  \item{columns}{ ~~Describe \code{columns} here~~ }
15
  \item{half}{ ~~Describe \code{half} here~~ }
16
  \item{quadratic}{ ~~Describe \code{quadratic} here~~ }
17
}
18
\details{
19
  ~~ If necessary, more details than the description above ~~
20
}
21
\value{
22
  ~Describe the value returned
23
  If it is a LIST, use
24
  \item{comp1 }{Description of 'comp1'}
25
  \item{comp2 }{Description of 'comp2'}
26
  ...
27
}
28
\references{ ~put references to the literature/web site here ~ }
29
\author{ ~~who you are~~ }
30
\note{ ~~further notes~~ 
31
 
32
 ~Make other sections like Warning with \section{Warning }{....} ~
33
}
34
\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ }
35
\examples{
36
##---- Should be DIRECTLY executable !! ----
37
##-- ==>  Define data, use random,
38
##--	or do  help(data=index)  for the standard data sets.
39
 
40
## The function is currently defined as
41
function (mfrow = c(1, 1), columns = 1, half = FALSE, quadratic = FALSE) 
42
{
43
    .BDPars <- list()
44
    .BDPars$figdir <- "figs/"
45
    .BDPars$paper <- "b5"
46
    .BDPars$filename <- NA
47
    .BDPars$method <- "xy"
48
    .BDPars$xytype <- "l"
49
    .BDPars$xlab <- "longxlabel"
50
    .BDPars$ylab <- "longylabel"
51
    .BDPars$toplab <- NA
52
    .BDPars$rightlab <- NA
53
    .BDPars$xlim <- NULL
54
    .BDPars$ylim <- NULL
55
    .BDPars$draw.xaxis <- TRUE
56
    .BDPars$draw.yaxis <- TRUE
57
    .BDPars$grid <- FALSE
58
    .BDPars$grid.lwd <- 0.3
59
    .BDPars$grid.h <- NA
60
    .BDPars$grid.v <- NA
61
    .BDPars$grid.col <- "grey50"
62
    .BDPars$cex.plot <- 0.4
63
    .BDPars$cex.main <- 0.7
64
    .BDPars$cex.lab <- 0.6
65
    .BDPars$cex.axis <- 0.5
66
    .BDPars$lwd <- 0.5
67
    .BDPars$tcl <- -0.2
68
    .BDPars$cex.legend <- 0.4
69
    .BDPars$pos.legend <- "topright"
70
    .BDPars$bg.legend <- "white"
71
    .BDPars$col <- "black"
72
    .BDPars$bty <- "o"
73
    .BDPars$pch <- 21
74
    .BDPars$mar.nolab <- c(1.5, 1, 0.4, 0.3)
75
    .BDPars$mar.lab <- c(2.1, 2.1, 1.9, 1.9)
76
    mar.lab.half <- c(2.1, 1.9, 1.9, 1.9)
77
    .BDPars$mgp.xaxis <- c(1, -0.1, 0)
78
    .BDPars$mgp.yaxis <- c(1, 0.15, 0)
79
    .BDPars$mgp.global <- c(0.8, 0.15, 0)
80
    .BDPars$xlabLine <- 0.9
81
    .BDPars$ylabLine <- 1.1
82
    .BDPars$color.palette <- colorRampPalette(c("#3c1900", "#fef7b7"))
83
    .BDPars$color.palette2 <- colorRampPalette(c("#3c1900", "#ffffff"))
84
    .BDPars$colpal.heat <- colorRampPalette(c("#ff0000", "#0000ff"))
85
    .BDPars$colpal.ml <- colorRampPalette(c("#ff0000", "#00ff00", 
86
        "#0000ff"))
87
    .BDPars$colpal.wyr <- colorRampPalette(c("#ffffff", 7, "#ff0000"))
88
    .BDPars$colpal.wgr <- colorRampPalette(c("#ffffff", "#00ff00", 
89
        "#ff0000"))
90
    .BDPars$colpal <- .BDPars$colpal.wgr
91
    .BDPars$b5.width <- 4.782
92
    if (.BDPars$paper == "b5") {
93
        if (all(mfrow == c(1, 1)) & columns == 1) {
94
            if (half) {
95
                .BDPars$width <- 2.354
96
                .BDPars$height <- 2.15
97
                .BDPars$mar.lab <- mar.lab.half
98
            }
99
            else if (quadratic) {
100
                .BDPars$width <- .BDPars$b5.width
101
                .BDPars$height <- .BDPars$b5.width
102
            }
103
            else {
104
                .BDPars$width <- .BDPars$b5.width
105
                .BDPars$height <- 2.7
106
            }
107
        }
108
        else if (all(mfrow == c(2, 1)) & columns == 1) {
109
            .BDPars$width <- .BDPars$b5.width
110
            .BDPars$height <- 2.7 * 2
111
        }
112
        else if (all(mfrow == c(3, 1))) {
113
            .BDPars$width <- .BDPars$b5.width
114
            .BDPars$height <- 2.7 * 2
115
        }
116
    }
117
    else if (.BDPars$paper == "a4") {
118
        if (all(mfrow == c(1, 1)) & columns == 1 & .BDPars$paper == 
119
            "a4") {
120
            .BDPars$width <- 6
121
            .BDPars$height <- 2.2
122
        }
123
        else {
124
            if (all(mfrow == c(2, 1)) & columns == 1) {
125
                .BDPars$width <- 6
126
                .BDPars$height <- 3.5
127
            }
128
            if (all(mfrow == c(3, 1)) & columns == 1) {
129
                .BDPars$width <- 6
130
                .BDPars$height <- 4.5
131
            }
132
            if (all(mfrow == c(4, 1)) & columns == 1) {
133
                .BDPars$width <- 6
134
                .BDPars$height <- 5.5
135
            }
136
            if (all(mfrow == c(1, 2)) & columns == 1) {
137
                .BDPars$width <- 6
138
                .BDPars$height <- 2.5
139
            }
140
        }
141
    }
142
    .BDPars$mfrow <- mfrow
143
    .BDPars
144
  }
145
}
146
% Add one or more standard keywords, see file 'KEYWORDS' in the
147
% R documentation directory.
148
\keyword{ ~kwd1 }
149
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line