Skip to main content

matplotlib-pyodide

PyPI Latest Release GHA codecov

HTML5 backends for Matplotlib compatible with Pyodide

This package includes two matplotlib backends,

  • the wasm_backend which from allows rendering the Agg buffer as static images into an HTML canvas
  • an interactive HTML5 canvas backend html5_canvas_backend described in this blog post

Installation

This package will be installed as a dependency when you load matplotlib in Pyodide.

Usage

To change the backend in matplotlib,

  • for the wasm backend,
    import matplotlib
    matplotlib.use("module://matplotlib_pyodide.wasm_backend")
    
  • for the interactive HTML5 backend;
    import matplotlib
    matplotlib.use("module://matplotlib_pyodide.html5_canvas_backend")
    

By default, matplotlib figures will be rendered inside a div that's appended to the end of document.body. You can override this behavior by setting document.pyodideMplTarget to an HTML element. If you had an HTML element with id "target", you could configure the backend to render visualizations inside it with this code:

document.pyodideMplTarget = document.getElementById('target')

For more information see the matplotlib documentation.

License

pyodide-cli uses the Mozilla Public License Version 2.0.

Metadata

Release files for matplotlib-pyodide 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matplotlib-pyodide 0.2.3
File Size Uploaded Provenance Actions
matplotlib_pyodide-0.2.3.tar.gz 3.4 MB Without provenance Details for matplotlib_pyodide-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for matplotlib-pyodide 0.2.3
File Interpreter ABI Platform Actions
matplotlib_pyodide-0.2.3-py3-none-any.whl Python 3 none any Details for matplotlib_pyodide-0.2.3-py3-none-any.whl

Total release size: 3.4 MB

Release files / matplotlib_pyodide-0.2.3.tar.gz

Download URL matplotlib_pyodide-0.2.3.tar.gz
Size 3.4 MB
Tags Source
SHA-256 checksum
How to use checksums
05a0042957f26ac77f824aa3d11ae25f3c0d05f93f78f3ed507d11a577da2ce9
BLAKE2b-256 checksum
How to use checksums
1af9b5f36d3221e8e211f366544ccc817c61e8f5c2bcc912fe1e1bf9a6044909
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / matplotlib_pyodide-0.2.3-py3-none-any.whl

Download URL matplotlib_pyodide-0.2.3-py3-none-any.whl
Size 26.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0f8c342a038316c89fe8e7a2bcbf4ef11b08344d72cd18ded38a1cddd41c8a6
BLAKE2b-256 checksum
How to use checksums
5b9af2d911a8ae68f71366288c54d72271332419c1ed1ced64543d8213d9ff5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Security for matplotlib-pyodide 0.2.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page