Interactive tools for matplotlib
Project description
mpltoolbox
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.
Documentation
The documentation for mpltoolbox
can be found at https://mpltoolbox.readthedocs.io.
Installation
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)
Lines
fig, ax = plt.subplots()
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
lines = tbx.Lines(ax=ax, n=2)
Rectangles
fig, ax = plt.subplots()
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
rectangles = tbx.Rectangles(ax=ax)
Ellipses
fig, ax = plt.subplots()
ax.set_xlim(0, 100)
ax.set_ylim(0, 100)
ellipses = tbx.Ellipses(ax=ax)
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
mpltoolbox-24.5.1.tar.gz
(150.5 kB
view details)
Built Distribution
File details
Details for the file mpltoolbox-24.5.1.tar.gz
.
File metadata
- Download URL: mpltoolbox-24.5.1.tar.gz
- Upload date:
- Size: 150.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 873f131b390147b188ba2693c95544a55ee923a0fefa3349d1bcfa74de1e46ae |
|
MD5 | bfe0d00ed52f7edaed97f6eaf895c868 |
|
BLAKE2b-256 | 3f5ec3afae2ca5850566f712d8f6da5c01d84fa76514fdbc3d9bcb80030c21e5 |
File details
Details for the file mpltoolbox-24.5.1-py3-none-any.whl
.
File metadata
- Download URL: mpltoolbox-24.5.1-py3-none-any.whl
- Upload date:
- Size: 19.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c4b96d6fd8ef1f1fc21e543feef35fb0f700b87942d4314e4b755cada830a02 |
|
MD5 | 5144c2280ea7dbaa4038f71828bece95 |
|
BLAKE2b-256 | 656044a44b026fb540ef03c3ec26d17452993d882df918b164aab4254c6844a7 |