Skip to content

Commit 6af5752

Browse files
spec: add dendrogram-radial specification (#5256)
## New Specification: `dendrogram-radial` Related to #5245 --- ### specification.md # dendrogram-radial: Radial Dendrogram ## Description A radial dendrogram renders hierarchical clustering in a circular layout where the root node sits at the center and branches extend outward, with leaf nodes arranged around the circumference. This layout is a space-efficient alternative to linear dendrograms for large hierarchies, making it well-suited for datasets with hundreds of leaves. Branch lengths are proportional to distance or dissimilarity, preserving the quantitative interpretation of cluster merges. ## Applications - Displaying phylogenetic trees with hundreds of species in a compact circular form - Visualizing organizational hierarchies or reporting structures without excessive horizontal/vertical scrolling - Showing file system or taxonomy structures where many leaf nodes need to be visible simultaneously - Presenting clustering dendrograms for gene expression data with color-coded cluster assignments ## Data - `linkage_matrix` (numeric matrix) - hierarchical clustering linkage matrix in scipy format (n-1 × 4), encoding merge indices, distances, and cluster sizes - `labels` (string[]) - names for each leaf node, displayed around the circumference - `cluster_colors` (string[] or int[], optional) - cluster assignment for each leaf, used to color branches or an outer metadata ring - Size: 20-500 leaf nodes recommended; radial layout excels where linear dendrograms become unwieldy ## Notes - Root is positioned at the center; leaves are placed at equal angular spacing around the circumference - Branch length (radial distance) should be proportional to merge distance/dissimilarity - Color branches by cluster assignment using a categorical colormap - Optional: add a color-coded ring around the outer edge to encode additional metadata (e.g., species family, department) - Use scipy.cluster.hierarchy for linkage computation; polar projection in matplotlib or dedicated libraries for radial rendering - Consider adding interactive tooltips for leaf labels when the number of leaves exceeds readable text size --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/24290833855)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 10c20b5 commit 6af5752

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# dendrogram-radial: Radial Dendrogram
2+
3+
## Description
4+
5+
A radial dendrogram renders hierarchical clustering in a circular layout where the root node sits at the center and branches extend outward, with leaf nodes arranged around the circumference. This layout is a space-efficient alternative to linear dendrograms for large hierarchies, making it well-suited for datasets with hundreds of leaves. Branch lengths are proportional to distance or dissimilarity, preserving the quantitative interpretation of cluster merges.
6+
7+
## Applications
8+
9+
- Displaying phylogenetic trees with hundreds of species in a compact circular form
10+
- Visualizing organizational hierarchies or reporting structures without excessive horizontal/vertical scrolling
11+
- Showing file system or taxonomy structures where many leaf nodes need to be visible simultaneously
12+
- Presenting clustering dendrograms for gene expression data with color-coded cluster assignments
13+
14+
## Data
15+
16+
- `linkage_matrix` (numeric matrix) - hierarchical clustering linkage matrix in scipy format (n-1 × 4), encoding merge indices, distances, and cluster sizes
17+
- `labels` (string[]) - names for each leaf node, displayed around the circumference
18+
- `cluster_colors` (string[] or int[], optional) - cluster assignment for each leaf, used to color branches or an outer metadata ring
19+
- Size: 20-500 leaf nodes recommended; radial layout excels where linear dendrograms become unwieldy
20+
21+
## Notes
22+
23+
- Root is positioned at the center; leaves are placed at equal angular spacing around the circumference
24+
- Branch length (radial distance) should be proportional to merge distance/dissimilarity
25+
- Color branches by cluster assignment using a categorical colormap
26+
- Optional: add a color-coded ring around the outer edge to encode additional metadata (e.g., species family, department)
27+
- Use scipy.cluster.hierarchy for linkage computation; polar projection in matplotlib or dedicated libraries for radial rendering
28+
- Consider adding interactive tooltips for leaf labels when the number of leaves exceeds readable text size
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Specification-level metadata for dendrogram-radial
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: dendrogram-radial
5+
title: Radial Dendrogram
6+
7+
# Specification tracking
8+
created: "2026-04-11T20:23:06Z"
9+
updated: null
10+
issue: 5245
11+
suggested: MarkusNeusinger
12+
13+
# Classification tags (applies to all library implementations)
14+
# See docs/reference/tagging-system.md for detailed guidelines
15+
tags:
16+
plot_type:
17+
- dendrogram
18+
data_type:
19+
- hierarchical
20+
- numeric
21+
domain:
22+
- science
23+
- general
24+
features:
25+
- radial
26+
- color-mapped
27+
- clustering

0 commit comments

Comments
 (0)