plotTree {HMPTrees} | R Documentation |
Plots a Tree Object
Description
This function takes one or more 'phylo' objects and plots them.
Usage
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:
The
phylo
type is a product of theape
package and thecreateTrees
function in this package produces a list ofphylo
type objects for use with this function.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
data(saliva)
### Creates a tree for the 4th sample in 'Saliva' then plots it
salivaTree <- createTrees(saliva[,4, drop=FALSE])
plotTree(salivaTree, displayLegend=FALSE)