Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

add.simmap.legend

Add legend to stochastically mapped tree


Description

This function adds a legend (by default, interactively) to a plotted stochastic character mapped tree.

Usage

add.simmap.legend(leg=NULL, colors, prompt=TRUE, vertical=TRUE, ...)

Arguments

leg

states for the discrete character in the order of colors.

colors

colors for the legend in the order of leg, or, if leg=NULL, named vector of colors in which names(colors are the states of the mapped discrete character.

prompt

logical value indicating whether the location of the legend should be obtained interactively (i.e., by clicking in the plotting area).

vertical

logical value indiciating whether to plot the legend vertically (if TRUE) or horizontally.

...

optional arguments including: x x-coordinate of the legend (if prompt=FALSE); y y-coordinate of the legend; and shape which can be shape="square", the default, or shape="circle".

Author(s)

References

Revell, L. J. (2012) phytools: An R package for phylogenetic comparative biology (and other things). Methods Ecol. Evol., 3, 217-223.

See Also


phytools

Phylogenetic Tools for Comparative Biology (and Other Things)

v0.7-70
GPL (>= 2)
Authors
Liam J. Revell
Initial release
2020-9-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.