draw.boxes: Plot Boxes around Clades in a Phylogeny

Description Usage Arguments Note Author(s) See Also Examples

Description

These functions allow to draw boxes around clades/lineages in the plotting of a phylogenetic tree.

Usage

1
2
3
4
5
6
7
box.clades(phy, nodes, col, border = NA, shaded = NULL,
    text = NULL, textcol = "black", cex = 1, rshift = 0,
    align, expand = c(0, 0, 0, 0))
    
box.tips(phy, nodes, col, border = NA, 
    text = NULL, textcol = "black", cex = 1, rshift = 0, 
    align, expand = c(0, 0, 0, 0))

Arguments

phy

an object of class phylo.

nodes

a vector of mode numeric giving the MRCA node(s) of the clade(s) to be highlighted.

col

colors to fill the boxes with; default is "lightgrey". Use col = NA to for non-filled, transparent boxes.

border

colors of the borders of boxes. Use border = NA to omit borders.

shaded

either NULL (then boxes will be filled with the color(s) specified with col) or a list of four named! elements: h (hue), c (chroma), l (luminance), and power (increase of chroma and luminance to the power of ...). See hcl and sequential_hcl.

text

a character string giving the text to be plotted to the right of the clade. Can be set to NULL (the default) to omit plotting of text.

cex

numeric, character expansion, i.e. size, for text.

textcol

a vector of mode character, giving colors for the text.

rshift

a numeric used to shift the right boundary of the box further to the right, e.g. to place more text.

align

a vector with three possible values: "tipwise", "cladewise", or "all", which controls the 'outer' (i.e distal to the root) alignment of boxes. "tipwise" is only allowed in box.tips. See Examples section for a demonstration.

expand

a numerical vector of the form c(bottom, left, top, right) which controls the size of boxes.

...

further graphical parameters may also be supplied as arguments.

Note

Do not expect these functions to work with all flavors of plot.phylo: Currently, box.clades and box.tips only work with directions "rightwards", "leftwards", and "upwards" with plots of type "phylogram" and "cladogram". The text argument works only with directions "rightwards" and "leftwards".

box.clades and box.tips requires the use of plot.phylo.upon (see Examples section).

Author(s)

Christoph Heibl

See Also

plot.phylo for plotting of phylogenetic trees; clade.bars for plotting boxes around tips/clades; tip.color and edge.color for coloring tips labels or braches/edges of a plotted tree.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## DATA: phylogentic relationships of bird orders:
## -----------------------------------------------
data(viperidae)
genera <- list("Montivipera", "Macrovipera", "Vipera", "Daboia")
genera.mrca <- noi(viperidae, regex = TRUE, genera)
cls <- c("yellow", "skyblue", "orange", "pink")

## EXAMPLE 1: the defaults of box.clades
## -------------------------------------
#plot(viperidae, edge.color = 0, tip.color = 0, no.margin = TRUE)
#box.clades(viperidae, genera.mrca)
#plot.phylo.upon(viperidae, no.margin = TRUE)

## EXAMPLE 2: the defaults of box.tips
## -------------------------------------
#plot(viperidae, edge.color = 0, tip.color = 0, no.margin = TRUE)
#box.tips(viperidae, genera.mrca)
#plot.phylo.upon(viperidae, no.margin = TRUE)

fmichonneau/phyloch documentation built on May 16, 2019, 1:45 p.m.