Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chord Diagram

Signature

sp.chord(title, labels, matrix, *, variant="basic", **kwargs) -> Chart

Aliases: sp.chord, sp.chord_chart, sp.chord_diagram

Description

Chord diagrams show relationships between entities using arcs and ribbons around a circle. The matrix is an N×N flow matrix where matrix[i][j] is the flow from node i to node j.

Variants

Data

labels (list[str]) — Node names. matrix (list[list[float]]) — N×N flow matrix. width / height (int) — Chart dimensions (default 700×700).

Parameters

Themes

Returns

Chart — object with .html property and .show() method.

Standard filled ribbons

Variant "basic"Aliases basic / default / classic
Preview

Wider ribbon links

Variant "ribbon"Aliases ribbon / wide
Preview

Arc-only (no filled ribbons)

Variant "arc"Aliases arc / outline
Preview

Single-color monochrome

Variant "mono"Aliases mono / single
Preview

Draws a small arrowhead on each ribbon pointing toward whichever side receives more — reads the matrix's row/column asymmetry directly off the diagram instead of just the ribbon's natural taper.

Variant "directed"Aliases directed / asymmetric / flow_direction / arrows
Preview