refdb_plot_tax_tree | R Documentation |
Represent the hierarchical structure of the taxonomic information of a reference database as a tree.
refdb_plot_tax_tree( x, leaf_col = NULL, color_col = NULL, freq_labels = 0, expand_plot = 0.5 )
x |
a reference database. |
leaf_col |
a column name referring to the taxonomic level
for the leaves of the tree. If not provided ( |
color_col |
a column name referring to the taxonomic level
for the color of the leaves (must be higher or equal to the level
of |
freq_labels |
a numeric value to adjust the number of printed labels (minimum frequency). Default is zero which means all non-NA labels are printed. |
expand_plot |
a value to expand the limits of the plot. Useful if the labels are too long. |
The underlying graph is computed using the non-exported function
igraph_from_taxo
.
A ggplot2 (ggraph) object. This means the plot can be further customized using ggplot2 compatible functions.
lib <- read.csv(system.file("extdata", "baetidae_bold.csv", package = "refdb")) lib <- refdb_set_fields_BOLD(lib) refdb_plot_tax_tree(lib)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.