Arc Diagram
Signature
sp.arc_diagram(title, labels, edges_i, edges_j, edges_w, *, variant="basic", **kwargs) -> Chart
Aliases: sp.arc_diagram, sp.arc_chart, sp.arc_plot, sp.arc_graph, sp.linear_network
Description
Arc diagrams place nodes on a horizontal axis and draw quadratic bezier arcs above (and optionally below) the axis to represent connections. They are particularly effective for showing sequential or ordered relationships.
Variants
Data
labels (list[str]) — Node names. edges_i (list[int]) — Source node indices. edges_j (list[int]) — Target node indices. edges_w (list[float]) — Edge weights. width / height (int) — Chart dimensions.
Parameters
Themes
Returns
Chart — object with .html property and .show() method.
Arcs above the axis
Alternating arcs above and below
Stroke width proportional to edge weight
Thin, low-opacity arcs with small strokeless nodes — strips away the visual weight so overlapping arcs stay legible in dense diagrams.
Draws a small arrowhead where each arc lands on its target node — turns the diagram into a proper directed graph, e.g. for dependency or citation edges where "which way" matters as much as "how much".