add.gts: Geological time scale

View source: R/add.gts.R

add.gtsR Documentation

Geological time scale

Description

Adds geological time scale (GTS) to plots.

Usage

add.gts(thickness, quaternary = T, is.phylo = F,
        xpd.x = T, time.interval = 1, names = NULL, fill = T,
        cex = 1, padj = -0.5, direction = "rightwards")

Arguments

thickness

numeric < 0. Define the thickness of the scale.

quaternary

bolean. Whether to merge Pleistocene and Holocene into Quaternary. Default is TRUE.

is.phylo

bolean. Whether the plot is a phylogeny or not. Default is FALSE.

time.interval

numeric. Define the minimum time interval (in million years) for the geological time scale. Default is 1 and displays ticks every million year but with numbers at every five million years.

xpd.x

bolean. Whether to expand the last period of the geological time scale before root age (mainly for tree). Default is TRUE.

names

a character vector with the names of geological periods (stages). Can be used to write abbreviations. Default is NULL and display full names (except for Quaternary and Pliocene).

fill

bolean. If TRUE (default), backbground is alternatively filled with grey and white bands to distinguish geological periods. If FALSE, dashed lines are drawn to limit geological periods.

cex

numeric. Size of the names of geological periods.

padj

padj argument defining space between the axis and the values of the axis (see par() for more details).

direction

character. Direct the geological time scale. Can be either "rightwards" (default) of "leftwards" (NOT IMPLEMENTED YET).

Details

This function plots a geological times scale (GTS). It has been designed for adding GTS to plot of phylogeny, diversification rates and paleodiversity dynamics through time but can be used with any R plot. Time should be negative for other plots than phylogenies.

Value

Draws geological time scale on x axis.

Author(s)

Nathan Mazet

References

Mazet, N., Morlon, H., Fabre, P., Condamine, F.L., (2023). Estimating clade‐specific diversification rates and palaeodiversity dynamics from reconstructed phylogenies. Methods in Ecology and in Evolution 14, 2575–2591. https://doi.org/10.1111/2041-210X.14195

Examples

## Not run: 
# with a phylogeny
data("Cetacea")
# first plot to get the dimensions of the gts
plot(Cetacea, cex = 0.5, label.offset = 0.2, tip.color = "white")
add.gts(-3, quaternary = T, is.phylo = T, xpd.x = F,
        names = c("Q.", "Pli.", "Miocene", "Oligocene", "Eoc."))
# second plot to display the tree on the gts
par(new = T)
plot(Cetacea, cex = 0.5, label.offset = 0.2)
mtext("Time (Myrs)", side = 1, line = 3, at = 18)

# see Appendix S4 from Mazet et al. (2023) for more examples.


## End(Not run)

hmorlon/PANDA documentation built on April 24, 2024, 3:27 a.m.