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 hashes)
Built Distribution
Close
Hashes for mpltoolbox-24.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c4b96d6fd8ef1f1fc21e543feef35fb0f700b87942d4314e4b755cada830a02 |
|
MD5 | 5144c2280ea7dbaa4038f71828bece95 |
|
BLAKE2b-256 | 656044a44b026fb540ef03c3ec26d17452993d882df918b164aab4254c6844a7 |