dendro: Plot hespdiv dendrogram

View source: R/dendro.R

dendroR Documentation

Plot hespdiv dendrogram

Description

This function displays a dendrogram of polygons produced by hespdiv split-lines. Branch length is proportional to difference. If performance of split-lines is a similarity measure, it is internally converted to difference.

Usage

dendro(
  obj,
  poly.scheme = NULL,
  color = 1,
  performance.col = "blue",
  labels.col = 1,
  offset.factor = 1,
  arrange = TRUE,
  grob = TRUE,
  label.size = 0.5
)

Arguments

obj

A hespdiv object.

poly.scheme

ggplot2 object produced with poly_scheme function. Provide if you want identical colors for polygons in both plots.

color

color vector used for dendrogram nodes and branches.

performance.col

color vector used for text, displaying difference values between polygons

labels.col

color vector used for text, displaying polygon IDs.

offset.factor

numeric value used to scale the offset distance of displayed polygon IDs and performance values from a dendrogram node. Adjust experimentally, if you don't like the current distance.

arrange

logical. Plot hespdiv dendrogram above polygon scheme?

grob

logical. Convert plot to grob? Must be true, if you want to arrange polygon scheme and the dendrogram in a single plot.

label.size

size of labels.

Value

A grob or TableGrob object if grob = TRUE, otherwise NULL.

Note

If you want to transform similarity to difference externally, before applying dendro, change maximize to TRUE in the call info of obj.

Author(s)

Liudas Daumantas

See Also

Other HespDiv visualization options: blok3d(), create_gif(), plot.nullhespdiv(), plot_cs_hsa(), plot_hespdiv(), plot_hsa(), plot_hsa_q(), poly_scheme(), polypop()

Examples

scheme <- poly_scheme(example_hespdiv)
# notice the colors in used in scheme:
scheme
# Dendrogram visualization of polygons, using colors from scheme
dendro(example_hespdiv, poly.scheme = scheme, arrange = FALSE, grob = FALSE)

hespdiv documentation built on May 21, 2026, 5:09 p.m.