plot.interactive.probmat: Interactive conspecificity heatmap (plotly)

View source: R/plot.interactive.probmat.R

plot.interactive.probmatR Documentation

Interactive conspecificity heatmap (plotly)

Description

HTML heatmap of pairwise conspecificity probabilities with hover details, optionally aligned with a PNG of the tree; exportable via save_html. Requires suggested packages plotly, base64enc, htmlwidgets.

Usage

## S3 method for class 'interactive.probmat'
plot(
  x,
  tree,
  palette = "green",
  show_tree = TRUE,
  tree_width = 0.3,
  width = 1400,
  height = 1000,
  save_html = NULL,
  ...
)

Arguments

x

A "bgmycprobmat" matrix.

tree

A "phylo" object with the same tip labels.

palette

"green" (default), "viridis", "RdYlBu" or "warm".

show_tree

Logical; render the tree to the left of the matrix.

tree_width

Fraction of the figure width used by the tree (0–1).

width, height

Figure size in pixels.

save_html

Optional HTML output path (self-contained).

...

Passed to ape::plot.phylo() when drawing the tree.

Value

Invisibly, the plotly object.

Examples


set.seed(123)
data(east10)
res <- bgmyc.singlephy(east10[[1]], mcmc = 100, burnin = 10, thinning = 10)
plot.interactive.probmat(spec.probmat(res), east10[[1]])


bGMYC4 documentation built on Nov. 23, 2026, 5:07 p.m.