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

View source: R/blackSet.R

blackSetR Documentation

Sets the plot environment to draw a long vertical data set

Description

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

Usage

blackSet(
  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,
  abbr = "",
  skip = 0,
  targ = list(col = "black", lwd = 2),
  sarg = list(lty = 2, col = "black")
)

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 lines are vertical

abbr

text to be repeated on the lines at each major tick

skip

number of text redundancies to be skipped

targ, sarg

a list of arguments to feed to text() and segments() 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)

blackSet(c(0,4),f, ytick = 10, ny = 10, skip = 1)

points(x, y, pch=19)

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