| highlight_clades | R Documentation |
Adds colored highlighting for specified taxonomic groups. Only monophyletic groups are highlighted; non-monophyletic groups trigger a warning. Supports special identifiers LUCA, LACA, LBCA for ancestral nodes.
highlight_clades(
p,
tree,
groups,
rank,
format = "auto",
colors = NULL,
alpha = 0.2,
custom_patterns = NULL,
delimiter_mode = "reverse",
taxonomy_levels = NULL
)
p |
A |
tree |
A |
groups |
Character vector of group names to highlight.
Can include special identifiers: |
rank |
Character. Taxonomic rank of the groups (ignored for special identifiers). |
format |
Character. Taxonomy label format. Default: |
colors |
Named character vector of colors for each group.
If |
alpha |
Numeric. Transparency of the highlight. Default: |
custom_patterns |
Named list of regex patterns for custom format. |
taxonomy_levels |
Custom taxonomy level configuration (list with codes and names).
Default: |
A ggplot object with highlights added.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.