add_hpd_range: Add HPD (Highest Posterior Density) range to a tree plot

View source: R/support-labels.R

add_hpd_rangeR Documentation

Add HPD (Highest Posterior Density) range to a tree plot

Description

Uses ggtree::geom_range() to display horizontal uncertainty bars on internal nodes. Requires a node.data data frame attached to the tree with a HPD column (list column of c(lower, upper) vectors).

Usage

add_hpd_range(p, tree, color = "firebrick")

Arguments

p

ggplot object

tree

phylo object (with node.data containing HPD annotations)

color

Color for HPD bars. Default: "firebrick".

Value

ggplot object


Rclade documentation built on Sept. 26, 2026, 5:07 p.m.