Skip to content

Add ChartMultiSelect widget for multi-region selections#144

Merged
koaning merged 2 commits intomainfrom
koaning/multi-select-widget
Feb 25, 2026
Merged

Add ChartMultiSelect widget for multi-region selections#144
koaning merged 2 commits intomainfrom
koaning/multi-select-widget

Conversation

@koaning
Copy link
Owner

@koaning koaning commented Feb 25, 2026

Summary

Adds ChartMultiSelect, a new widget for drawing multiple persistent box/lasso selections on matplotlib charts. Each selection is tagged with a class label (a, b, c, d), enabling interactive classification workflows.

Features

  • Draw multiple persistent selections in box or lasso mode
  • Assign each selection a class label (1–4 classes)
  • Click to highlight a selection → delete button removes it
  • Drag selections to reposition
  • Undo removes the last-drawn selection
  • Clear all removes all selections
  • Python helpers: get_labels(), get_mask(), get_indices() for filtering classified points
  • from_callback() pattern for reactive re-rendering
  • Light/dark theme CSS support
  • Full log-scale axis support

Demo

Two examples in demos/chartmultiselect.py:

  • Two moons: lasso selections to classify interleaved crescents
  • Three blobs: box selections to cover three clusters with accuracy feedback

🤖 Generated with Claude Code

Vincent D. Warmerdam and others added 2 commits February 25, 2026 16:00
Adds a new widget for drawing multiple persistent box/lasso selections on matplotlib charts, each tagged with a class label (a, b, c, d). Users can highlight individual selections for editing, delete them, undo the last one, or clear all. Features include draggable repositioning, class-button switching, and Python helpers (get_labels, get_mask, get_indices) for classification workflows. Includes light/dark theme CSS, marimo demo with two-moons and three-blobs datasets, and integration into docs.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
…sion bump

- Bump version 0.2.31 → 0.2.32
- Add reference page and mkdocs nav entry for ChartMultiSelect
- Add screenshot to gallery assets
- Fix gallery image paths to use chartmultiselect.png
- Fix interaction: drawing now works on top of existing selections (single click to highlight instead)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@koaning koaning merged commit 172d65d into main Feb 25, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant