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

Bubble Charts

Signature

sp.bubble(title, x_values, y_values, sizes, *, variant="basic", categories=None, labels=None, color_values=None, **kwargs) -> Chart

Description

sp.bubble() is the unified entry point for the entire bubble-chart family. The variant keyword selects the rendering strategy — all other arguments remain consistent across variants. A bubble chart extends a 2D scatter plot with a third numeric dimension represented as bubble area (not radius), following best practices for perceptual accuracy.

Variants

Parameters


Returns

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



Variant "basic"Aliases basic / simpleReturns Chart
Preview
Variant "categorical" / "grouped"Aliases category / groupsReturns Chart
Preview
Variant "labeled" / "text"Aliases labels / annotatedReturns Chart
Preview
Variant "outlined" / "hollow"Aliases ring / openReturns Chart
Preview
Variant "negative" / "signed"Aliases divergingReturns Chart
Preview

A categorical bubble matrix: x_categories and y_categories place bubbles on a grid, each split into a left/right half-circle by a binary categories value, sized by sizes - a native version of matplotlib's MarkerStyle(fillstyle="left"/"right") split-marker bubble chart, plus a magenta size-scale legend column.

Variant "split"Required x_categories, y_categories, categories, sizesReturns Chart
Preview