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-0.1.3.tar.gz
(179.0 kB
view hashes)
Built Distribution
mpltoolbox-0.1.3-py3-none-any.whl
(13.5 kB
view hashes)
Close
Hashes for mpltoolbox-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45bc6bba2868058d750d8054353d3d0051938ce327ded3d6229603c706f78590 |
|
MD5 | 9f13e0ee2550dfb36e69d5364dab2b80 |
|
BLAKE2b-256 | 644fa5051811f0d8c03232a1b3bb8242e8231215d33526b3ad9424b5f14b949a |