plotTree: Plots a Tree Object

Description Usage Arguments Details Value Author(s) Examples

View source: R/plotTree.R

Description

This function takes one or more 'phylo' objects and plots them.

Usage

1
2
3
	plotTree(treeList, colors = NULL, divisions = NULL, main = NULL, sub = "", 
		showTipLabel = TRUE, showNodeLabel = FALSE, displayLegend = TRUE, 
		trees = NULL)

Arguments

treeList

A list that contains at least one tree of type 'phylo'.

colors

A vector of colors to be applied to the branches in the plot.

divisions

A vector of numbers to be used as break points to assign different colors.

main

A custom title(s) for the plot(s).

sub

A custom subtitle for the plot.

showTipLabel

Hides the tip labels if 'FALSE' otherwise it shows all non-zero tip labels.

showNodeLabel

Hides the interior node labels if 'FALSE' otherwise it shows all non-zero node labels.

displayLegend

Enables the display of a legend of the branch colors and divisions when 'TRUE'.

trees

Deprecated. Replaced with treeList.

Details

Notes:

  1. The phylo type is a product of the ape package and the createTrees function in this package produces a list of phylo type objects for use with this function.

  2. The values for division should directly relate to the values of your data, i.e. if your data ranges from 0 to 50000 reads you should adjust the divisions to fit your data.

Value

A plot of the tree(s).

Author(s)

Berkley Shands, Patricio S. La Rosa, Elena Deych, William D. Shannon

Examples

1
2
3
4
5
	data(saliva)
	
	### Creates a tree for the 4th sample in 'Saliva' then plots it
	salivaTree <- createTrees(saliva[,4, drop=FALSE])
	plotTree(salivaTree, displayLegend=FALSE)

HMPTrees documentation built on May 2, 2019, 4:02 p.m.