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

Plot Web — Force-Directed Bubble Network

Signature

sp.plot_web(title, x_values, y_values, *, variant="scatter", sizes=None, labels=None, groups=None, **kwargs) -> Chart

Aliases: sp.plot_web, sp.web_plot, sp.plotweb, sp.carbon_web, sp.web_chart, sp.flow_web

Description

sp.plot_web() places each data point as a sized bubble node and lets the two positional axes (x_values/y_values) drive layout instead of a fixed cartesian grid — the scatter variant reads them as literal coordinates on a light-trail canvas, the radial variant re-projects them onto concentric rings around a center point. Bubble radius scales between min_r and max_r from the sizes array (or a constant radius if omitted), and groups assigns a categorical color from palette per node.

Variants

Data

x_values (list[float]) — Horizontal position (scatter) or angle-driving value (radial). y_values (list[float]) — Vertical position (scatter) or radius-driving value (radial). sizes (list[float]) — Per-node value driving bubble radius between min_r and max_r. labels (list[str]) — Per-node hover label. groups (list[str]) — Per-node category, colored from palette.

Parameters

Themes

Returns

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

Nodes positioned directly from `x_values`/`y_values`, connecting light-trail background.

Variant "scatter"Aliases scatter / web / connected / default / flow
Preview

Nodes re-projected onto concentric rings, angle and radius derived from the same input coordinates.

Variant "radial"Aliases radial / solar / stellar / mandala / spider
Preview