Draggable data windowing for matplotlib plots
Project description
matplotlib-window
Draggable data windowing for matplotlib plots. Inspired by the adventures of past me and dragpy.
Interface
For most use cases, interaction with this library is done via the helper wrappers in matplotlib_window.window. These functions will accept the user data and build the plots directly for windowing.
fixed_window
Plot the provided data & build a draggable fixed-width window to select bounds of interest; the x-locations of the edges of the window are returned once the figure window is closed.
Parameters
| Parameter | Description | Type | Default |
|---|---|---|---|
x_data |
x data values to plot | Sequence[int|float] |
Required |
y_data |
y data values to plot | Sequence[int|float] |
Required |
position |
x-coordinate of the left edge of the window | int|float |
Required |
window_width |
Width, along the x-axis, of the draggable window | int|float |
Required |
snap_to_data |
Prevent dragging of the window beyond beyond the bounds of the plotted data | bool |
True |
axes_kwargs |
Optional kwargs to pass to the Axes constructor1 |
dict[str, Any] |
{"title": ...} |
plot_kwargs |
Optional kwargs to pass to the plotting call2 | dict[str, Any] |
{} |
- kwargs are passed directly to the
Axesconstructor, see thematplotlib.axes.Axesdocumentation for supported arguments. - kwargs are passed directly to the plotting call, see the
matplotlib.pyplot.plotdocumentation for supported arguments.
flexible_window
Plot the provided data & build a flexible-width window to select bounds of interest; the x-locations of the edges of the window are returned once the figure window is closed.
Parameters
| Parameter | Description | Type | Default |
|---|---|---|---|
x_data |
x data values to plot | Sequence[int|float] |
Required |
y_data |
y data values to plot | Sequence[int|float] |
Required |
position |
x-coordinate of the left edge of the window | int|float |
Required |
window_width |
Starting width, along the x-axis, of the flexible window | int|float |
Required |
snap_to_data |
Prevent dragging of the window beyond beyond the bounds of the plotted data | bool |
True |
allow_face_drag |
Allow dragging of the window using its face1 | bool |
False |
axes_kwargs |
Optional kwargs to pass to the Axes constructor2 |
dict[str, Any] |
{"title": ...} |
plot_kwargs |
Optional kwargs to pass to the plotting call3 | dict[str, Any] |
{} |
- Currently not implemented
- kwargs are passed directly to the
Axesconstructor, see thematplotlib.axes.Axesdocumentation for supported arguments. - kwargs are passed directly to the plotting call, see the
matplotlib.pyplot.plotdocumentation for supported arguments.
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 matplotlib_window-1.1.0.tar.gz.
File metadata
- Download URL: matplotlib_window-1.1.0.tar.gz
- Upload date:
- Size: 485.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad9dccdcdef2696e616f25ee80dd2d5212f78dda651a70fddfa88a1c2739b848
|
|
| MD5 |
3396206a84d82dd796dac497ec57cc91
|
|
| BLAKE2b-256 |
7730b2e500f8abf000ef82eeedc5217204b7a0f8e7c8cc620ca5304527c9ccb1
|
Provenance
The following attestation bundles were made for matplotlib_window-1.1.0.tar.gz:
Publisher:
pypi_release.yml on sco1/matplotlib-window
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matplotlib_window-1.1.0.tar.gz -
Subject digest:
ad9dccdcdef2696e616f25ee80dd2d5212f78dda651a70fddfa88a1c2739b848 - Sigstore transparency entry: 158430952
- Sigstore integration time:
-
Permalink:
sco1/matplotlib-window@1b03d716f5b320943ac7d6b8fdc75292e533dcf1 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/sco1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@1b03d716f5b320943ac7d6b8fdc75292e533dcf1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file matplotlib_window-1.1.0-py3-none-any.whl.
File metadata
- Download URL: matplotlib_window-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d70930a5c3cb8640789f5479cdd4eb90c5ab293edf987d44645252c75e52ccb3
|
|
| MD5 |
b9c5b40b7d30d5cb1d45ef149db45d59
|
|
| BLAKE2b-256 |
b72b288ceaee43f24bae8f6d40d7783ac35900fb606a573abdef79d2fbc1c0e3
|
Provenance
The following attestation bundles were made for matplotlib_window-1.1.0-py3-none-any.whl:
Publisher:
pypi_release.yml on sco1/matplotlib-window
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
matplotlib_window-1.1.0-py3-none-any.whl -
Subject digest:
d70930a5c3cb8640789f5479cdd4eb90c5ab293edf987d44645252c75e52ccb3 - Sigstore transparency entry: 158430953
- Sigstore integration time:
-
Permalink:
sco1/matplotlib-window@1b03d716f5b320943ac7d6b8fdc75292e533dcf1 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/sco1
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi_release.yml@1b03d716f5b320943ac7d6b8fdc75292e533dcf1 -
Trigger Event:
release
-
Statement type: