Learn R Programming

StratigrapheR (version 0.0.2)

whiteSet: Sets the plot environment to draw a long data set

Description

Sets the plot environment to draw a long dataset. It is without background, and with only axes with major and minor ticks.

Usage

whiteSet(xlim, ylim, xtick = NA, ytick = NA, nx = 1, ny = 1,
  xaxs = "i", yaxs = "i", xarg = list(tick.ratio = 0.5),
  yarg = list(tick.ratio = 0.5, las = 1), add = FALSE)

Arguments

xlim, ylim

the x and y limits (e.g. xlim = c(-1,1))

xtick, ytick

the interval between each major ticks for x and y

nx, ny

the number of intervals between major ticks to be divided by minor ticks in the x and y axes

xaxs, yaxs

The style of axis interval calculation to be used for the x and y axes. By default it is "i" (internal): it just finds an axis with pretty labels that fits within the original data range. You can also set it to "r" (regular): it first extends the data range by 4 percent at each end and then finds an axis with pretty labels that fits within the extended range. See ?par for further explanation

xarg, yarg

a list of arguments to feed to minorAxis() for the x and y axes. See the ?minorAxis help page for the possible arguments. See ?merge_list for further information.

add

whether to add to an existing plot

See Also

Similar functions: greySet and blackSet

To create axes with major and minor ticks: minorAxis

To print a plot in pdf: pdfDisplay

To automatically determine pretty interval limits: encase

Examples

Run this code
# NOT RUN {
y <- c(0,11,19,33)
x <- c(1,2,2.5,4)

a <- min(y)
b <- max(y)

f <- encase(a-1,b,5)

whiteSet(c(0,4), f, ytick = 5, ny = 5, xaxs = "r")

points(x, y, pch=19)
# }

Run the code above in your browser using DataLab