greySet: Sets the plot environment to draw a long vertical data set

View source: R/greySet.R

greySetR Documentation

Sets the plot environment to draw a long vertical data set

Description

Sets the plot environment to draw a long dataset. It provides grey bands as supplementary scale, and axes with major and minor ticks.

Usage

greySet(
  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),
  v = T,
  inverse = F,
  abbr = "",
  skip = 0,
  targ = list(col = "white", lwd = 2),
  rarg = list(border = NA, col = "grey85")
)

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.

v

whether the grey bands are vertical

inverse

inverse the bands position

abbr

text to be repeated in the grey bands each major tick

skip

number of text redundancies to be skipped

targ, rarg

a list of arguments to feed to text() and rect() respectively. If set to NULL, does not add the corresponding element.

Value

A plotting environment to draw a long data set

See Also

Similar functions: whiteSet and greySet

To create axes with major and minor ticks: minorAxis

To print a plot in pdf: pdfDisplay

To automatically determine pretty interval limits: encase

Examples

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)

greySet(c(0,4),f,abbr="abbr", ytick = 10, ny = 10)

points(x, y, pch=19)

StratigrapheR documentation built on July 9, 2023, 6:02 p.m.