Skip to main content

mplview

PyPI conda-forge Travis CI Read the Docs Coveralls License

A simple, embeddable Matplotlib-based image viewer.

Example

Typically mplview is used within the context of the Jupyter Notebook. Though it can also be used with any interactive GUI backend that matplotlib provides. Below is a brief example of how this works in the Jupyter Notebook with some dummy data. Similar usage can be applied to other contexts.

# Run the following in your Notebook
#
# %matplotlib notebook

import numpy as np
import matplotlib.pyplot as plt
from mplview.core import MatplotlibViewer

arr = np.random.random((25, 30, 35))

mplsv = plt.figure(FigureClass=MatplotlibViewer)
mplsv.set_images(
    arr,
    vmin=0.0,
    vmax=1.0
)

The array provided to set the images must provide a reasonable subset of the NumPy array interface (primarily slicing and coercion to NumPy Arrays). This allows other array types to be used for visualization easily (e.g. Dask Arrays).

Credits

This package was created with Cookiecutter and the nanshe-org/nanshe-cookiecutter project template.

History

0.1.0 (2016-11-01)

  • First release on PyPI.

Metadata

Release files for mplview 0.0.6

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

Source distribution (sdist)

Source distribution for mplview 0.0.6
File Size Uploaded Provenance Actions
mplview-0.0.6.tar.gz 31.9 kB Without provenance Details for mplview-0.0.6.tar.gz

Release files / mplview-0.0.6.tar.gz

Download URL mplview-0.0.6.tar.gz
Size 31.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9edddd9bfd6397fe39fd70c9f5e152354a2b04a0f253e869135eb009b09222fa
BLAKE2b-256 checksum
How to use checksums
d23695b728a55765396319fb85b8faea3adca145e770d00d44d3be8052004471
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

Security for mplview 0.0.6

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