A previous release had provenance metadata, but this release does not. View details.
matplotly
Jupyter-native interactive matplotlib figure editor.
Edit any matplotlib figure interactively — styles, colors, labels, legends — then export reproducible Python code. No separate GUI; everything runs inline in your notebook.
Features
- 10+ plot types: line, scatter, bar, histogram, box, violin, errorbar, heatmap, fill, marginal
- AI style extraction: upload a reference plot image and automatically match its style (fonts, colors, spines, ticks, legend, etc.) using Claude or GPT vision models
- Code generation: export a standalone Python script that recreates your styled figure
- Undo / redo: full command history with keyboard shortcuts
- Style profiles: save and load reusable figure styles
- Subplot support: edit multi-panel figures with per-axes controls
Installation
pip install matplotly[ai]
This includes everything: the interactive editor plus AI-powered style extraction via Claude or GPT vision models. Requires an Anthropic or OpenAI API key for the AI features (set via environment variable or entered in the UI).
For a lightweight install without AI dependencies (anthropic, openai, Pillow, PyMuPDF):
pip install matplotly
The base install gives you the full interactive editor — manual controls for styles, colors, labels, legends, code export, undo/redo, and style profiles. The only difference is you won't have the AI style extraction tab.
Both versions require a Jupyter environment with the ipympl backend:
%matplotlib widget
Quick Start
%matplotlib widget
import matplotlib.pyplot as plt
from matplotly import matplotly
# 1. Pass a figure directly
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 4, 9])
matplotly(fig)
# 2. Decorator mode
@matplotly
def my_plot():
plt.plot([1, 2, 3], [1, 4, 9])
my_plot()
# 3. Context manager
with matplotly() as pb:
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 4, 9])
Supported Plot Types
| Type | Description |
|---|---|
| Line | ax.plot() |
| Scatter | ax.scatter() |
| Bar | ax.bar() / ax.barh() |
| Histogram | ax.hist() |
| Box | ax.boxplot() |
| Violin | ax.violinplot() |
| Errorbar | ax.errorbar() |
| Heatmap | ax.imshow() / ax.pcolormesh() |
| Fill | ax.fill_between() / ax.fill_betweenx() |
| Marginal | Joint + marginal distribution plots |
AI Style Extraction
Have a plot style you want to match? Upload a reference image and let a vision model do the work.
How it works: You upload a reference plot image (PNG, JPEG, PDF, TIFF, or WebP) and select a vision model. The system runs a two-pass agentic pipeline:
- Pass 1 — Extraction: The vision model analyzes the reference image and extracts a structured JSON of style parameters: font sizes and families, spine visibility, tick direction/length, grid settings, legend placement, background color, and per-series properties (colors, line widths, markers, hatches, etc.).
- Pass 2 — Verification: The same model re-examines the reference image against the extracted parameters, checking each one for accuracy. Only fields that need correction are updated.
The corrected styles are then applied to your figure automatically — updating both the matplotlib artists and the UI controls so everything stays in sync.
Supported providers:
- Anthropic: Claude Sonnet 4, Claude Haiku 3.5
- OpenAI: GPT-5, GPT-4o, and variants
Saving and reusing styles: After extraction, you can download the result as a JSON profile. Load it later to apply the same style to any figure — no API call needed.
API keys: Set ANTHROPIC_API_KEY or OPENAI_API_KEY as an environment variable, or paste the key directly into the editor UI. No secrets are written to disk.
Documentation
Full documentation is available at matplotly.readthedocs.io.
Contributing
Contributions are welcome! Please open an issue or pull request on GitHub.
License
MIT — see LICENSE for details.
Metadata
Release files for matplotly 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
These files do not have provenance metadata, despite files in a prior release including this data.
We recommend further investigation before installing these files. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| matplotly-0.1.5.tar.gz | 2.1 MB | Without provenance | Details for matplotly-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| matplotly-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for matplotly-0.1.5-py3-none-any.whl |
Total release size: 2.2 MB
Release files / matplotly-0.1.5.tar.gz
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | matplotly-0.1.5.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0e6abea9f8e698d6651f3e567e64caf7e03680f402ef1ce146371287587f73d
|
|
BLAKE2b-256 checksum How to use checksums |
40e7fddbd68a16e6b265e4952c627e62f6bb0e7e27f655bac9fd3d4bbed33394
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / matplotly-0.1.5-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | matplotly-0.1.5-py3-none-any.whl |
|---|---|
| Size | 141.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7dd82e7778a7a312320d595e49ab10655c5892cbb5f830023933f82bb24737f
|
|
BLAKE2b-256 checksum How to use checksums |
486025e73dd3077923e22cadbc5425b198be5fc7563adb0ccc1cbcf07e3b3328
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for matplotly 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 0.1.0 2 files With provenance
- Added 0.1.5 2 files Without provenance
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.