plot_tree_ranks | R Documentation |
plots a tree along with a series of taxonomic ranks
plot_tree_ranks( tree, taxonomy, main = NULL, type = "unrooted", ranks = common_ranks, size = 2, guide_size = NULL, legend_cutoff = 25, ... )
tree |
to be plotted, use layout_tree to layout tree. |
taxonomy |
A data.frame with an accession field corresponding to the tree tip labels. |
main |
An optional title for the plot |
type |
The type of tree to plot, default unrooted. |
ranks |
The ranks to include, defaults to all common ranks, if null print all ranks. |
size |
The size of the colored points |
guide_size |
The size of the length guide. If NULL auto detects a reasonable size. |
legend_cutoff |
The number of different taxa names after which the names are no longer printed. |
... |
additional arguments passed to |
plot_tree
to plot only a single rank or the just the
tree layout.
library(gridExtra) library(directlabels) #plot all the common ranks plot_tree_ranks(mammals_16S$tree, mammals_16S$taxonomy) #plot specific ranks, with a larger dot size plot_tree_ranks(mammals_16S$tree, mammals_16S$taxonomy, ranks=c('kingdom', 'class', 'family'), size=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.