Skip to main content

Interactive tools for Matplotlib

Project description

Contributor Covenant PyPI badge Anaconda-Server Badge License: BSD 3-Clause Binder

Mpltoolbox

About

Mpltoolbox aims to provide some basic tools (that other libraries such as bokeh or plotly support) for drawing points, lines, rectangles, polygons on Matplotlib figures.

There are many interactive examples in the Matplotlib documentation pages, but the code snippets are often long and potentially not straightforward to maintain.

With mpltoolbox, activating these tools should (hopefully) just be a one-liner.

Installation

python -m pip install mpltoolbox

Examples

import matplotlib.pyplot as plt
import mpltoolbox as tbx
%matplotlib widget

Points

fig, ax = plt.subplots()
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)

points = tbx.Points(ax=ax)

points

Lines

fig, ax = plt.subplots()
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)

lines = tbx.Lines(ax=ax, n=2)

lines

Rectangles

fig, ax = plt.subplots()
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)

rectangles = tbx.Rectangles(ax=ax)

rects

Ellipses

fig, ax = plt.subplots()
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)

ellipses = tbx.Ellipses(ax=ax)

ellipses

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpltoolbox-25.10.0.tar.gz (315.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mpltoolbox-25.10.0-py3-none-any.whl (20.7 kB view details)

Uploaded Python 3

File details

Details for the file mpltoolbox-25.10.0.tar.gz.

File metadata

  • Download URL: mpltoolbox-25.10.0.tar.gz
  • Upload date:
  • Size: 315.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mpltoolbox-25.10.0.tar.gz
Algorithm Hash digest
SHA256 08ae7f15ec88ede8bfe25d21533c41c7012bc0d6993f72f34ddfae89bfd6ebef
MD5 09ee554af707348017d5f6a73dac417a
BLAKE2b-256 c741ed7af89add46cd97d26adc98ef57cf8cd795f2117a128065784885a3b1ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for mpltoolbox-25.10.0.tar.gz:

Publisher: release.yml on scipp/mpltoolbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mpltoolbox-25.10.0-py3-none-any.whl.

File metadata

  • Download URL: mpltoolbox-25.10.0-py3-none-any.whl
  • Upload date:
  • Size: 20.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for mpltoolbox-25.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc8fea5128d4f0241e826823790698645666eb2a0cb87061a05dcfcc83e6b2d2
MD5 0f7b01a7e60af9c33ca09c58ad8caabc
BLAKE2b-256 c081128f9b5e4dad03768f598513baec8f4f1829c4b5503355d5dc0eee8fa75c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mpltoolbox-25.10.0-py3-none-any.whl:

Publisher: release.yml on scipp/mpltoolbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page