plot.taxodist_cluster: Plot method for taxodist_cluster objects

View source: R/utils.R

plot.taxodist_clusterR Documentation

Plot method for taxodist_cluster objects

Description

Plots the hierarchical clustering dendrogram produced by taxo_cluster().

Usage

## S3 method for class 'taxodist_cluster'
plot(
  x,
  main = "Taxonomic Clustering",
  xlab = "",
  sub = paste("Method:", if (!is.null(x$hclust)) x$hclust$method else "None"),
  ...
)

Arguments

x

A taxodist_cluster object from taxo_cluster().

main

Plot title. Default: "Taxonomic Clustering".

xlab

X-axis label. Default: "".

sub

Subtitle. Default: clustering method used.

...

Additional arguments passed to stats::plot.hclust().

Value

Invisibly returns x. Called for side effects (plotting).

Examples


taxa <- c("Tyrannosaurus", "Velociraptor", "Triceratops", "Brachiosaurus")
cl <- taxo_cluster(taxa)
plot(cl)


taxodist documentation built on May 6, 2026, 1:06 a.m.