cladeCol: Create colors for plotting clades

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/cladeCol.R

Description

Create a vector of colors for use in plot.phylo so that designated clades have a unique color

Usage

1
cladeCol(phy, clades, cols, bg.col = par("fg"))

Arguments

phy

the phylogeny for which to compute colors

clades

a list of clades

cols

a vector of colors, one for each clade

bg.col

color for “background” edges (i.e. those not specified by clades)

Details

Clades are specified by the names of their members, see example

Value

A character vector of the desired colors

Author(s)

Andy Rominger <ajrominger@gmail.com>

See Also

phylo, plot.phylo

Examples

1
2
phy <- read.tree(text="(A,(C,G));")
plot(phy, edge.color=clade.col(phy, list("A",c("C","G")),c("red","blue")))

ajrominger/socorro documentation built on Jan. 3, 2020, 6:25 a.m.