API Reference#
The anyplotlib public API is organized into five modules below. Click a card to browse the module page, or use the summary tables to jump directly to a class or function.
Figure
The Figure widget and the
subplots() factory — the main entry point
for creating interactive figures.
Layout
GridSpec and SubplotSpec
for building flexible multi-panel figure layouts.
Markers
Static visual overlays — circles, arrows, lines, rectangles, polygons, text, and more — drawn on top of any plot.
Interactive Widgets
Draggable overlays such as CrosshairWidget
and RectangleWidget that report position
back to Python.
Callbacks
The CallbackRegistry two-tier event system
(on_change for live frames, on_release for settled state)
and the Event dataclass.
Figure#
Multi-panel interactive figure widget. |
Axes & Plots#
A single grid cell in a Figure. |
|
1-D line plot panel returned by |
|
2-D image plot panel. |
|
2-D mesh plot panel created by |
|
3-D plot panel. |
|
Bar-chart plot panel. |
Layout#
Define a grid of subplot cells. |
|
Describes which grid cells a subplot occupies. |
Markers#
A named collection of markers of one type on one plot. |
|
Dict-like container for all named groups of one marker type. |
|
Top-level two-level marker registry for a plot. |
Interactive Widgets#
Base class for all overlay widgets. |
|
Draggable rectangle overlay widget for 2-D plots. |
|
Draggable circle overlay widget for 2-D plots. |
|
Draggable annular (ring) overlay widget for 2-D plots. |
|
Draggable crosshair overlay widget for 2-D plots. |
|
Draggable polygon overlay widget for 2-D plots. |
|
Text label overlay widget for 2-D plots. |
|
Draggable vertical line overlay widget for 1-D plots. |
|
Draggable horizontal line overlay widget for bar charts. |
|
Draggable range selection widget. |
Callbacks#
Per-object registry for on_click / on_changed / on_release / on_key / on_line_hover / on_line_click callbacks. |
|
A single interactive event. |