add.simmap.legend: Add legend to stochastically mapped tree

View source: R/plotSimmap.R

add.simmap.legendR Documentation

Add legend to stochastically mapped tree

Description

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 indicating 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".

Details

Redundant with legend, which is much more powerful but somewhat more complicated to use.

Author(s)

Liam Revell liam.revell@umb.edu

References

Revell, L. J. (2024) phytools 2.0: an updated R ecosystem for phylogenetic comparative methods (and other things). PeerJ, 12, e16505.

See Also

plotSimmap


phytools documentation built on June 22, 2024, 10:39 a.m.