Skip to main content

matplotlib-window

PyPI - Python Version PyPI PyPI - License pre-commit.ci status

Draggable data windowing for matplotlib plots. Inspired by the adventures of past me and dragpy.

fixed window sample

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] {}
  1. kwargs are passed directly to the Axes constructor, see the matplotlib.axes.Axes documentation for supported arguments.
  2. kwargs are passed directly to the plotting call, see the matplotlib.pyplot.plot documentation 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] {}
  1. Currently not implemented
  2. kwargs are passed directly to the Axes constructor, see the matplotlib.axes.Axes documentation for supported arguments.
  3. kwargs are passed directly to the plotting call, see the matplotlib.pyplot.plot documentation for supported arguments.

Metadata

Release files for matplotlib-window 1.1.0

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

Source distribution (sdist)

Source distribution for matplotlib-window 1.1.0
File Size Uploaded
matplotlib_window-1.1.0.tar.gz 485.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for matplotlib-window 1.1.0
File Interpreter ABI Platform
matplotlib_window-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 495.1 kB

Release files / matplotlib_window-1.1.0.tar.gz

Download URL matplotlib_window-1.1.0.tar.gz
Size 485.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ad9dccdcdef2696e616f25ee80dd2d5212f78dda651a70fddfa88a1c2739b848
BLAKE2b-256 checksum
How to use checksums
7730b2e500f8abf000ef82eeedc5217204b7a0f8e7c8cc620ca5304527c9ccb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 31, 2024.

Transparency log

Release files / matplotlib_window-1.1.0-py3-none-any.whl

Download URL matplotlib_window-1.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d70930a5c3cb8640789f5479cdd4eb90c5ab293edf987d44645252c75e52ccb3
BLAKE2b-256 checksum
How to use checksums
b72b288ceaee43f24bae8f6d40d7783ac35900fb606a573abdef79d2fbc1c0e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 31, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

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