1 |
pdel |
1 |
## hvad hvis mfrow er NA? hvad er columns? den kan kun saettes til 1,
|
|
|
2 |
## det virker maerkeligt... Er det til artikler, hvor man ofte skriver
|
|
|
3 |
## i to spalter? Hvad saa med en "a4.2col" paper?
|
|
|
4 |
|
|
|
5 |
## What about a beamer mode?
|
|
|
6 |
|
|
|
7 |
|
|
|
8 |
.bdconf.default <- function(mfrow=c(1,1), columns=1, half=FALSE, quadratic=FALSE)
|
|
|
9 |
{
|
|
|
10 |
##Global and control parameters
|
|
|
11 |
.BDPars <- list()
|
|
|
12 |
## This will be put in front of filenames. Set to NA, NULL or "" to omit.
|
|
|
13 |
.BDPars$figdir <- "figs/"
|
|
|
14 |
## Choose paper size for automatic figure sizing. Only "b5" implemented
|
|
|
15 |
.BDPars$paper <- "a4.word"
|
|
|
16 |
## This should probably not have a default value different from NA
|
|
|
17 |
.BDPars$file <- NA
|
|
|
18 |
## Default plotting method, i.e. type of plot. One of
|
|
|
19 |
## "xy", "histogram", "image.plot", "barplot" and "acf".
|
|
|
20 |
## This part is likely to be changed in the future.
|
|
|
21 |
## "xy" is like plot(x), plot(x,y). Don't confuse with xyplot from
|
|
|
22 |
## lattice.
|
|
|
23 |
.BDPars$method <- "xy"
|
|
|
24 |
|
|
|
25 |
## When plotting in xy mode, this is type in plot(). The possibilities are "n", "o", "l" (at least, see ?plot). for plot(), default is "p".
|
|
|
26 |
.BDPars$xytype <- "l"
|
|
|
27 |
|
|
|
28 |
## Nice to put to something default you (almost) always use x
|
|
|
29 |
## and y labels and you want to substitute them with psfrag
|
|
|
30 |
## anyway.
|
|
|
31 |
.BDPars$xlab <- "longxlabel"
|
|
|
32 |
.BDPars$ylab <- "longylabel"
|
|
|
33 |
|
|
|
34 |
.BDPars$toplab <- NA
|
|
|
35 |
.BDPars$rightlab <- NA
|
|
|
36 |
|
|
|
37 |
## You probably don't want a default here.
|
|
|
38 |
.BDPars$xlim <- NULL
|
|
|
39 |
.BDPars$ylim <- NULL
|
|
|
40 |
|
|
|
41 |
.BDPars$draw.xaxis <- TRUE
|
|
|
42 |
.BDPars$draw.yaxis <- TRUE
|
|
|
43 |
|
|
|
44 |
.BDPars$grid <- FALSE
|
|
|
45 |
.BDPars$grid.lwd <- 0.3
|
|
|
46 |
## what are these? NA/TRUE/"Def"?
|
|
|
47 |
.BDPars$grid.h <- NA
|
|
|
48 |
.BDPars$grid.v <- NA
|
|
|
49 |
|
|
|
50 |
.BDPars$grid.col <- "grey50"
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
## controls - at least - size of point characters
|
|
|
54 |
.BDPars$cex.plot <- 0.4
|
|
|
55 |
|
|
|
56 |
## See ?par
|
|
|
57 |
.BDPars$cex.main <- .7
|
|
|
58 |
##
|
|
|
59 |
## This has no effect on the axis label sizes if they are
|
|
|
60 |
## substituted with psfrag.
|
|
|
61 |
.BDPars$cex.lab <- .6
|
|
|
62 |
## font size on the axis indexing
|
|
|
63 |
.BDPars$cex.axis <- .5
|
|
|
64 |
## line width
|
|
|
65 |
.BDPars$lwd <- 0.5
|
|
|
66 |
## length of tick marks. positive values put the ticks inside the
|
|
|
67 |
## plots.
|
|
|
68 |
.BDPars$tcl <- -.2
|
|
|
69 |
|
|
|
70 |
## cex for legends. Legends are not written by pbp. But you
|
|
|
71 |
## may want to save your default anyway. It's used by bd.legend()
|
|
|
72 |
.BDPars$cex.legend <- .4
|
|
|
73 |
## a default position
|
|
|
74 |
.BDPars$pos.legend <- "topright"
|
|
|
75 |
## And a default background color: Is NA transparancy?
|
|
|
76 |
## This is not a background for the whole frame, it is for shapes.
|
|
|
77 |
.BDPars$bg.legend <- "white"
|
|
|
78 |
|
|
|
79 |
## col controls the color of the plot.
|
|
|
80 |
.BDPars$col <- "black"
|
|
|
81 |
|
|
|
82 |
## box around the plot.
|
|
|
83 |
.BDPars$bty <- "o"
|
|
|
84 |
|
|
|
85 |
## the default plotting character for points
|
|
|
86 |
.BDPars$pch <- 21
|
|
|
87 |
|
|
|
88 |
### Margins
|
|
|
89 |
## It may be tempting to omit a top margin or make it very small
|
|
|
90 |
## when there is no top label. But remember that sometimes numbers
|
|
|
91 |
## on the x axis exceed the plot region. If you make it very small,
|
|
|
92 |
## remember to check that for each plot, you may have to do some
|
|
|
93 |
## exceptions then.
|
|
|
94 |
|
|
|
95 |
##c(bottom, left, top, right)
|
|
|
96 |
.BDPars$mar.nolab <- c(1.5, 1, 0.4, 0.3)
|
|
|
97 |
.BDPars$mar.lab <- c(2.1, 2.1, 1.9, 1.9)
|
|
|
98 |
## This one can not be set with commands since it is used in this
|
|
|
99 |
## function.
|
|
|
100 |
mar.lab.half <- c(2.1, 1.9, 1.9, 1.9)
|
|
|
101 |
##c(2, 2, 1.5, 1.35)
|
|
|
102 |
|
|
|
103 |
|
|
|
104 |
## What exactly do these do?
|
|
|
105 |
## some control of distances from axis to text?
|
|
|
106 |
## mgp for axis commands.
|
|
|
107 |
## Only used if .BDPars$draw.xaxis=TRUE
|
|
|
108 |
## (?,,)
|
|
|
109 |
.BDPars$mgp.xaxis <- c(1, -.1, 0)
|
|
|
110 |
## Only used if .BDPars$draw.yaxis=TRUE
|
|
|
111 |
.BDPars$mgp.yaxis <- c(1, 0.15, 0)
|
|
|
112 |
## This (only first element?) has effect if axis labels are written
|
|
|
113 |
## by the plot command. It can also be written by the mtext
|
|
|
114 |
## command. Only one of these methods should be used in the
|
|
|
115 |
## future. I think the mtext way is more flexible, but then the
|
|
|
116 |
## distance should be calculated from the mgp.axis in stead of from
|
|
|
117 |
## the ?labLine. If not, these use different units which is
|
|
|
118 |
## confusing.
|
|
|
119 |
## (plotbox to labs, axis to axislabs,plotbox to axis)
|
|
|
120 |
.BDPars$mgp.global <- c(.8, .15, 0)
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
## Bruges det?
|
|
|
124 |
.BDPars$xlabLine <- 0.9
|
|
|
125 |
.BDPars$ylabLine <- 1.1
|
|
|
126 |
|
|
|
127 |
## A color map. This could be implemented for lattice/trellis plots?
|
|
|
128 |
## should at least be implemented as standard in image.plot
|
|
|
129 |
## .BDPars$color.palette <- colorRampPalette(c("#4d2a00","#eee7a7"))
|
|
|
130 |
.BDPars$color.palette <- colorRampPalette(c("#3c1900","#fef7b7"))
|
|
|
131 |
.BDPars$color.palette2 <- colorRampPalette(c("#3c1900","#ffffff"))
|
|
|
132 |
.BDPars$colpal.heat <- colorRampPalette(c("#ff0000","#0000ff"))
|
|
|
133 |
## the matlab red-green-blue
|
|
|
134 |
.BDPars$colpal.ml <- colorRampPalette(c("#ff0000","#00ff00","#0000ff"))
|
|
|
135 |
## white-yellow-red
|
|
|
136 |
## may be good for the screen, but white and yellow are too close for paper.
|
|
|
137 |
.BDPars$colpal.wyr <- colorRampPalette(c("#ffffff",7,"#ff0000"))
|
|
|
138 |
## white-green-red
|
|
|
139 |
.BDPars$colpal.wgr <- colorRampPalette(c("#ffffff","#00ff00","#ff0000"))
|
|
|
140 |
## may be good for the screen, but white and yellow are too close for paper.
|
|
|
141 |
## you have a favourite?
|
|
|
142 |
.BDPars$colpal <- .BDPars$colpal.wgr
|
|
|
143 |
|
|
|
144 |
### the first of these is only needed if using jpeg() in bdopen(). But that doesn't work...
|
|
|
145 |
.BDPars$jpeg.quality <- 100
|
|
|
146 |
.BDPars$jpeg.res <- 800
|
|
|
147 |
|
|
|
148 |
.BDPars
|
|
|
149 |
}
|