Go to most recent revision | Blame | Last modification | View Log | RSS feed
## hvad hvis mfrow er NA? hvad er columns? den kan kun saettes til 1,
## det virker maerkeligt... Er det til artikler, hvor man ofte skriver
## i to spalter? Hvad saa med en "a4.2col" paper?
## What about a beamer mode?
.bdconf.default <- function(mfrow=c(1,1), columns=1, half=FALSE, quadratic=FALSE)
{
##Global and control parameters
.BDPars <- list()
## This will be put in front of filenames. Set to NA, NULL or "" to omit.
.BDPars$figdir <- "figs/"
## Choose paper size for automatic figure sizing. Only "b5" implemented
.BDPars$paper <- "a4.word"
## This should probably not have a default value different from NA
.BDPars$file <- NA
## Default plotting method, i.e. type of plot. One of
## "xy", "histogram", "image.plot", "barplot" and "acf".
## This part is likely to be changed in the future.
## "xy" is like plot(x), plot(x,y). Don't confuse with xyplot from
## lattice.
.BDPars$method <- "xy"
## 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".
.BDPars$xytype <- "l"
## Nice to put to something default you (almost) always use x
## and y labels and you want to substitute them with psfrag
## anyway.
.BDPars$xlab <- "longxlabel"
.BDPars$ylab <- "longylabel"
.BDPars$toplab <- NA
.BDPars$rightlab <- NA
## You probably don't want a default here.
.BDPars$xlim <- NULL
.BDPars$ylim <- NULL
.BDPars$draw.xaxis <- TRUE
.BDPars$draw.yaxis <- TRUE
.BDPars$grid <- FALSE
.BDPars$grid.lwd <- 0.3
## what are these? NA/TRUE/"Def"?
.BDPars$grid.h <- NA
.BDPars$grid.v <- NA
.BDPars$grid.col <- "grey50"
## controls - at least - size of point characters
.BDPars$cex.plot <- 0.4
## See ?par
.BDPars$cex.main <- .7
##
## This has no effect on the axis label sizes if they are
## substituted with psfrag.
.BDPars$cex.lab <- .6
## font size on the axis indexing
.BDPars$cex.axis <- .5
## line width
.BDPars$lwd <- 0.5
## length of tick marks. positive values put the ticks inside the
## plots.
.BDPars$tcl <- -.2
## cex for legends. Legends are not written by pbp. But you
## may want to save your default anyway. It's used by bd.legend()
.BDPars$cex.legend <- .4
## a default position
.BDPars$pos.legend <- "topright"
## And a default background color: Is NA transparancy?
## This is not a background for the whole frame, it is for shapes.
.BDPars$bg.legend <- "white"
## col controls the color of the plot.
.BDPars$col <- "black"
## box around the plot.
.BDPars$bty <- "o"
## the default plotting character for points
.BDPars$pch <- 21
### Margins
## It may be tempting to omit a top margin or make it very small
## when there is no top label. But remember that sometimes numbers
## on the x axis exceed the plot region. If you make it very small,
## remember to check that for each plot, you may have to do some
## exceptions then.
##c(bottom, left, top, right)
.BDPars$mar.nolab <- c(1.5, 1, 0.4, 0.3)
.BDPars$mar.lab <- c(2.1, 2.1, 1.9, 1.9)
## This one can not be set with commands since it is used in this
## function.
mar.lab.half <- c(2.1, 1.9, 1.9, 1.9)
##c(2, 2, 1.5, 1.35)
## What exactly do these do?
## some control of distances from axis to text?
## mgp for axis commands.
## Only used if .BDPars$draw.xaxis=TRUE
## (?,,)
.BDPars$mgp.xaxis <- c(1, -.1, 0)
## Only used if .BDPars$draw.yaxis=TRUE
.BDPars$mgp.yaxis <- c(1, 0.15, 0)
## This (only first element?) has effect if axis labels are written
## by the plot command. It can also be written by the mtext
## command. Only one of these methods should be used in the
## future. I think the mtext way is more flexible, but then the
## distance should be calculated from the mgp.axis in stead of from
## the ?labLine. If not, these use different units which is
## confusing.
## (plotbox to labs, axis to axislabs,plotbox to axis)
.BDPars$mgp.global <- c(.8, .15, 0)
## Bruges det?
.BDPars$xlabLine <- 0.9
.BDPars$ylabLine <- 1.1
## A color map. This could be implemented for lattice/trellis plots?
## should at least be implemented as standard in image.plot
## .BDPars$color.palette <- colorRampPalette(c("#4d2a00","#eee7a7"))
.BDPars$color.palette <- colorRampPalette(c("#3c1900","#fef7b7"))
.BDPars$color.palette2 <- colorRampPalette(c("#3c1900","#ffffff"))
.BDPars$colpal.heat <- colorRampPalette(c("#ff0000","#0000ff"))
## the matlab red-green-blue
.BDPars$colpal.ml <- colorRampPalette(c("#ff0000","#00ff00","#0000ff"))
## white-yellow-red
## may be good for the screen, but white and yellow are too close for paper.
.BDPars$colpal.wyr <- colorRampPalette(c("#ffffff",7,"#ff0000"))
## white-green-red
.BDPars$colpal.wgr <- colorRampPalette(c("#ffffff","#00ff00","#ff0000"))
## may be good for the screen, but white and yellow are too close for paper.
## you have a favourite?
.BDPars$colpal <- .BDPars$colpal.wgr
### the first of these is only needed if using jpeg() in bdopen(). But that doesn't work...
.BDPars$jpeg.quality <- 100
.BDPars$jpeg.res <- 800
.BDPars
}