subtreeShow: Highlight a subtree

Description Usage Arguments Value Author(s) Examples

View source: R/subtreeShow.R

Description

Plot a tree, highlighting the clade(s) descending from the given node(s)

Usage

1
2
subtreeShow(tree, nodeList, showNodeLabels = "nodeList", mainCol = "black",
  subtreeCol = "red", nodeLabelCol = "lightblue", ...)

Arguments

tree

a tree of class phylo or phylo4. The tree should be binary and rooted; if not it will be coerced into a binary rooted tree using multi2di, if possible.

nodeList

a list of one or more internal nodes in the tree.

showNodeLabels

option of whether to show node labels. Default is "nodeList", which only labels the nodes in nodeList. Choosing showNodeLabels="all" will display all node labels; any other arguments will remove all node labels.

mainCol

colour for the edges which are not highlighted (default is black).

subtreeCol

colour for the edges which are highlighted (default is red).

nodeLabelCol

background colour for any node labels shown (default is light blue)

...

further arguments to be passed to plot.phylo

Value

A plot of the tree, with clade(s) descending from the given node(s) highlighted.

Author(s)

Michelle Kendall michelle.louise.kendall@gmail.com

Examples

1
2
3
4
5
6
7
## Highlight the clade(s) descending from nodes 23 and 35 in a random tree on 20 tips:
tree <- rtree(20)
subtreeShow(tree, nodeList=c(23,35))
# change aesthetics:
subtreeShow(tree,nodeList=c(23,35), mainCol="navy", subtreeCol="cyan", 
   nodeLabelCol="cyan", edge.width=2)
   

phyloTop documentation built on May 2, 2019, 11:03 a.m.