Skip to main content

mpl-measurements

Interactive measurement tools for Matplotlib.

Click two points on any plotted line to compute engineering-style measurements such as Δx, Δy, and signal statistics (min, max, RMS) over a selected interval.

mpl-measurements

To use it, simply call InteractiveScope(fig) where fig is your figure. Example:

import numpy as np
import matplotlib.pyplot as plt

from mpl_measurements import InteractiveScope


x = np.linspace(0, 10, 1000)
fig, axs = plt.subplots(2, 2, sharex=True)
axs = axs.flatten()

for ii, ax in enumerate(axs):
    ax.plot(x, np.sin(x + ii), label=f"sin {ii}")
    ax.plot(x, np.cos(x + ii), label=f"cos {ii}")
    ax.set_title(f"Axes {ii}")
    ax.legend()

InteractiveScope(fig) # This is the line!

# You can also call e.g. InteractiveScope(fig, axes=[axs[0], axs[1]]) if you
# want the measurements tool active only on axes axs[0], axs[1]. See
docstring for more info.

plt.show()

⚠️ Notes on layout engines

If a Matplotlib layout engine is used (e.g. "tight" or "constrained"), you must reserve space on the right side using rect:

    fig.set_layout_engine("tight", rect=[0, 0, 0.75, 1])>[Info]

Otherwise, the info panel may overlap with the plot axes.

Metadata

Release files for mpl-measurements 0.0.5

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

Source distribution (sdist)

Source distribution for mpl-measurements 0.0.5
File Size Uploaded Provenance Actions
mpl_measurements-0.0.5.tar.gz 7.9 kB Without provenance Details for mpl_measurements-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mpl-measurements 0.0.5
File Interpreter ABI Platform Actions
mpl_measurements-0.0.5-py3-none-any.whl Python 3 none any Details for mpl_measurements-0.0.5-py3-none-any.whl

Total release size: 15.6 kB

Release files / mpl_measurements-0.0.5.tar.gz

Download URL mpl_measurements-0.0.5.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
044cfb7c7e4ae9eb8a4a27772dac72db24ae4b730a0cb0c8bd8fe364dce6177f
BLAKE2b-256 checksum
How to use checksums
fcb2500be4bb5a6cb2e8af8ad2b3e8c3d481aea2f6a0fdf8e1c54ecf8fc01fb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / mpl_measurements-0.0.5-py3-none-any.whl

Download URL mpl_measurements-0.0.5-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d888139731bed1460185b53f3715ee031510fb8f312fb14165ed2938e41ba8cb
BLAKE2b-256 checksum
How to use checksums
8b64e2e850e9bfb0d17717bbb5fc655ed3c09fb07997959e88c9658cec48bfee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for mpl-measurements 0.0.5

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