secondary_scale: Secondary scale for strat.plot

View source: R/secondary_scale.R

secondary_scaleR Documentation

Secondary scale for strat.plot

Description

Adds a secondary scale for strat.plot

Usage

secondary_scale(
  x,
  yvar,
  yvar2,
  n = 5,
  xLeft = 0.11,
  ylabel2 = "",
  cex.ylabel2 = 1,
  cex.yaxis = 0.8
)

Arguments

x

a stratigraphic diagram object produced by strat.plot.

yvar

y variable. Same as main plot.

yvar2

Secondary y variable

n

Suggested number of labels on secondary y axis. Defaults to five.

xLeft

Position of plot. See strat.plot

ylabel2

character. Label for secondary scale

cex.ylabel2

numeric. Size of axis label.

cex.yaxis

numeric. Size of axis values.

Details

secondary_scale

Examples

library(rioja)
data(RLGH)
fos <- RLGH$spec
chron <- RLGH$depths
pt <- strat.plot(fos, yvar = chron$Depth, y.rev = TRUE, xLeft = .22, scale.percent = TRUE)
secondary_scale(pt, yvar = chron$Depth, yvar2 = chron$Age, n = 5, ylabel2 = "Years")

richardjtelford/ggpalaeo documentation built on Nov. 7, 2022, 11:03 p.m.