mpld3
D3 Viewer for Matplotlib
Decision gist · record as of 2026-08-14
Yes, if you need quick interactivity on matplotlib plots and can tolerate aging maintenance. The package is stable, has no known vulnerabilities, and installs with low friction. However, verify compatibility with your Python and matplotlib versions first—classifiers suggest old version support, and the maintainer has limited availability for bug fixes. Best suited for exploratory work or prototyping rather than production systems requiring active support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires matplotlib 2.2.2 and jinja2 2.7+; classifiers list Python 2.6–2.7 and 3.3–3.4, though requires_python is unspecified.
- Low install friction with pure-Python distribution.
- Maintenance is aging—the lead maintainer states limited availability, though pull requests are reviewed.
License · maintenance · safety
BSD 3-clause (permissive) — BSD 3-clause is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2025-11-05 (282 days) · last repo commit 2026-01-02 · 2,413 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 580,157 downloads/mo, #5,914 on PyPI
Alternatives
Verify before relying
import matplotlib.pyplot as plt
import mpld3
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 2, 3])
html = mpld3.fig_to_html(fig)
# Open html in browser or embed in IPython notebook- Whether the package actually works with modern Python versions (3.8+) despite classifiers listing only 2.6–3.4.
- Current compatibility with recent matplotlib versions beyond the stated 2.2.2 requirement.
- Whether IPython notebook integration remains functional with current Jupyter versions.
What it is and what it does
mpld3 bridges matplotlib and the web by converting static plots into interactive D3.js visualizations. It parses matplotlib figures using the mplexporter framework, outputs them as JSON, and renders them in a browser with pan, zoom, and hover interactivity. The package is pure Python and lightweight, making it straightforward to add to existing matplotlib workflows.
Typical use is embedding interactive plots in IPython notebooks or generating standalone HTML files for sharing. Many core matplotlib features are supported, though some advanced features like tick formatting, certain legend options, and twin axes remain unsupported. The package is in beta status and aging—the original author is no longer actively maintaining it, though the repository accepts pull requests.
Use it for
- Embed interactive matplotlib plots in IPython notebooks for exploratory data analysis.
- Export static matplotlib figures as standalone HTML files for sharing with non-technical stakeholders.
- Add pan, zoom, and hover tooltips to scientific plots without rewriting visualization code.
- Create web-based dashboards combining matplotlib plots with D3.js interactivity.
- Prototype interactive visualizations quickly from existing matplotlib code before building custom D3 solutions.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need quick interactivity on matplotlib plots and can tolerate aging maintenance.
The package is stable, has no known vulnerabilities, and installs with low friction. However, verify compatibility with your Python and matplotlib versions first—classifiers suggest old version support, and the maintainer has limited availability for bug fixes. Best suited for exploratory work or prototyping rather than production systems requiring active support.
Install
mpld3 on PyPI
Before you install
Low install friction with pure-Python distribution. Maintenance is aging—the lead maintainer states limited availability, though pull requests are reviewed. Last release was 282 days ago; repository remains active with 2413 stars.
Requires matplotlib 2.2.2 and jinja2 2.7+; classifiers list Python 2.6–2.7 and 3.3–3.4, though requires_python is unspecified.
License in practice
BSD 3-clause is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
import matplotlib.pyplot as plt
import mpld3
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 2, 3])
html = mpld3.fig_to_html(fig)
# Open html in browser or embed in IPython notebook
Verify before relying
- Whether the package actually works with modern Python versions (3.8+) despite classifiers listing only 2.6–3.4.
- Current compatibility with recent matplotlib versions beyond the stated 2.2.2 requirement.
- Whether IPython notebook integration remains functional with current Jupyter versions.
Package facts
| License | BSD 3-clause permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesjinja2matplotlib |
| Maintenance | Aging 282 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 580,157 / month, #5,914 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4 |
Evidence: mpld3-0.5.12-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “matplotlib to d3 converter”
- mpld3Converts matplotlib plots to interactive D3.js visualizations in the…
- python-nvd3Generates interactive NVD3 charts (pie, line, bar, scatter, and…
- bqscalesbqscales implements a grammar-of-graphics layer for creating…
Give your agent the search over MCP, or paste the wish link into any chat.
More Graphics packages
Pillow adds image processing capabilities to Python, providing file format support, efficient pixel data handling, and image manipulation operations.
Install it if you need to work with images in Python—it is the de facto standard for this task.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Enables matplotlib figures to display inline directly within Jupyter notebooks and IPython environments instead of in separate windows.
PyMuPDF extracts, renders, converts, and manipulates PDF and other document formats (XPS, EPUB, images, Office files via Pro) with high performance, providing text, tables, images, and metadata with precise layout information.
The AGPL license requires careful review if you are building proprietary software—commercial licensing is available from Artifex.
pypdfium2 is a Python binding to PDFium that enables PDF rendering, inspection, manipulation, and creation through a ctypes interface to Google's PDFium library.
Install it if you need PDF rendering, inspection, or manipulation in Python; the medium install friction is offset by comprehensive platform support.
Altair is a declarative Python library for creating interactive statistical visualizations by writing simple, readable code that compiles to Vega-Lite specifications.
See also mplcursors · python-nvd3 · py3Dmol · mplfinance · matplotlib · ipympl · pyLDAvis · splot · bqplot