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.

Units

In addition to numeric data, plotted data and window position/window_width values may be of any type supported by matplotlib's unit conversion (e.g. datetime/timedelta, or NumPy's datetime64/timedelta64).

Returned window bounds are always provided in the axes' native float units; for datetime data these can be converted back to datetimes using matplotlib.dates.num2date.

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 See: Note 1 Required
y_data y data values to plot See: Note 1 Required
position x-coordinate of the left edge of the window See: Note 1 Required
window_width Width, along the x-axis, of the draggable window See: Note 1 Required
snap_to_data Prevent dragging of the window beyond the bounds of the plotted data bool True
axes_kwargs Optional kwargs to pass to the Axes setter2 dict[str, Any] {"title": ...}
plot_kwargs Optional kwargs to pass to the plotting call3 dict[str, Any] {}
  1. int|float, or any type supported by matplotlib's unit conversion, see: Units
  2. kwargs are passed directly to the Axes using Axes.set(), 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.

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 See: Note 1 Required
y_data y data values to plot See: Note 1 Required
position x-coordinate of the left edge of the window See: Note 1 Required
window_width Starting width, along the x-axis, of the flexible window See: Note 1 Required
snap_to_data Prevent dragging of the window beyond the bounds of the plotted data bool True
allow_face_drag Allow dragging of the window using its face bool False
axes_kwargs Optional kwargs to pass to the Axes setter3 dict[str, Any] {"title": ...}
plot_kwargs Optional kwargs to pass to the plotting call4 dict[str, Any] {}
  1. int|float, or any type supported by matplotlib's unit conversion, see: Units
  2. kwargs are passed directly to the Axes using Axes.set(), 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.2.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.2.0
File Size Uploaded Provenance Actions
matplotlib_window-1.2.0.tar.gz 11.3 kB With provenance Details for matplotlib_window-1.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 27.1 kB

Release files / matplotlib_window-1.2.0.tar.gz

Download URL matplotlib_window-1.2.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e38c7e34281865eacde69b2545427ad04f6e8609b1ed531e32009e77fd9320f8
BLAKE2b-256 checksum
How to use checksums
0541d3b5595565a2de484b3b3058d973f8523dbe2dafd6818ad7d387fa8f6ec9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

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

Download URL matplotlib_window-1.2.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b708cc117766547f31e86ae0ca42c09f15b069a9cd924ce9a9968980bef1087
BLAKE2b-256 checksum
How to use checksums
cd205980563a1f219453894339ca4c5d76fff19d4ee8e7e225a5e89334a083e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 13, 2026.

Transparency log

Security for matplotlib-window 1.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for matplotlib_window-1.2.0.tar.gz

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 Nov 13, 2026.

Transparency log

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