ts.periods {paleoDiv}R Documentation

Add a horizontal, period-level phanerozoic timescale to any plot, especially calibrated phylogenies plotted with ape.

Description

Add a horizontal, period-level phanerozoic timescale to any plot, especially calibrated phylogenies plotted with ape.

Usage

ts.periods(
  phylo = NULL,
  alpha = 1,
  names = TRUE,
  exclude = c("Quarternary"),
  col.txt = NULL,
  border = NA,
  ylim = NULL,
  adj.txt = c(0.5, 0.5),
  txt.y = mean,
  bw = FALSE,
  update = NULL
)

Arguments

phylo

Optional (calibrated) phylogeny to which to add timescale. If phylogeny is provided, the $root.time variable is used to convert ages so that the time scale will fit the phylogeny.

alpha

Opacity value to use for the fill of the time scale

names

Logical indicating whether to plot period names (defaults to TRUE)

exclude

Character vector listing periods for which to not plot the names, if names==TRUE

col.txt

Color(s) to use for labels.

border

Color to use for the border of the timescale

ylim

Setting for height of the timescale. Can either be one single value giving the height of the timescale, in which case the function attempts to use the lower limit of the current plot as the lower margin, or a vector of length 2 containing the lower and upper limits of the timescale.

adj.txt

Numeric vector of length==2 giving horizontal and vertical label alignment (defaults to centered, i.e. 0.5 for both values)

txt.y

Function to use to determine the vertical text position (defaults to mean, i.e. centered)

bw

Logical whether to plot in black and white (defaults to FALSE). If TRUE, time scale is drawn with a white background

update

Character string giving the filename of a .csv table for providing an updated timescale. If provided, the values for plotting the time scale are taken from the csv file instead of the internally provided values. Table must have columns named periods, bottom, top and col, giving the period names, start time in ma, end time in ma and a valid color value, respectively.

Value

Plots a timescale on the currently active plot.

Examples

data(tree_archosauria)
ape::plot.phylo(tree_archosauria)
ts.periods(tree_archosauria, alpha=0.5)

[Package paleoDiv version 0.3.0 Index]