--- id: mpld3 version: "0.5.12" license: BSD 3-clause license_treatment: permissive maintenance: aging --- # mpld3 — D3 Viewer for Matplotlib License: permissive · Maintenance: aging · Downloads: 580.2K/mo ## 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 above — verify before relying. Converts matplotlib plots to interactive D3.js visualizations in the browser, enabling exploration and interaction with static graphics through a web-based viewer. 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 pip install mpld3 uv add mpld3 poetry add mpld3 ## Installing mpld3 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. 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 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. 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: unspecified - Install friction: low - Maintenance: aging - Downloads: 580.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags matplotlib to d3 converter, interactive matplotlib plots, d3 visualization from matplotlib, browser-based plot viewer, matplotlib web export, d3js matplotlib bridge, interactive chart browser, visualization, d3js, jupyter-friendly [View on SkillFed](https://skillfed.io/packages/mpld3) · [View on PyPI](https://pypi.org/project/mpld3/)