mpl_measurements add measurements to your matplotlib plots
Project description
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.
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, squeeze=False)
for ii, ax in enumerate(axs):
ax.plot(x, np.sin(x + ii), label=f"sin {ii}", picker=5)
ax.plot(x, np.cos(x + ii), label=f"cos {ii}", picker=5)
ax.set_title(f"Axes {ii}")
ax.legend()
# 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]
scope = InteractiveScope(fig)
plt.show()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mpl_measurements-0.0.1.tar.gz.
File metadata
- Download URL: mpl_measurements-0.0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ea9ef8576e917ee98bd879c19587e4abc0d5893a3ab468d451a245480c59957
|
|
| MD5 |
412eea4998bc73ee1df8e1d71b9cb272
|
|
| BLAKE2b-256 |
a120996975f4438e4eb9f126852be7e86213a751697afe1006072bf41029c54e
|
File details
Details for the file mpl_measurements-0.0.1-py3-none-any.whl.
File metadata
- Download URL: mpl_measurements-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28caf0fda762a8bd40bf271a24871bb0c47eeb5519a966d3cd1add8a94b1294a
|
|
| MD5 |
a62f8128361a38a1cf2e8c78b567ea98
|
|
| BLAKE2b-256 |
cfd013cef565950a57a333778b4af9bace533e9509edda41b38685b3e75a125b
|