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.

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
mplview-0.0.6.tar.gz 31.9 kB Details

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

Release history Release notifications | RSS feed

This release

0.0.6 This release

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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