Metadata-Version: 2.1
Name: mpltoolbox
Version: 0.1.2
Summary: Interactive tools for matplotlib
Home-page: https://github.com/mpltoolbox/mpltoolbox
Author: Neil Vaytet
Author-email: neil.vaytet@esss.se
License: BSD
Project-URL: Bug Tracker, https://github.com/mpltoolbox/mpltoolbox/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE

# 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

```sh
pip install mpltoolbox
```

## Examples

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

### Points

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

points = tbx.Points(ax=ax)
```

![points](https://mpltoolbox.readthedocs.io/en/latest/_images/points_4_0.png)


### Lines

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

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

![lines](https://mpltoolbox.readthedocs.io/en/latest/_images/lines_4_0.png)

### Rectangles

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

rectangles = tbx.Rectangles(ax=ax)
```

![rects](https://mpltoolbox.readthedocs.io/en/latest/_images/rectangles_4_0.png)

### Ellipses

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

ellipses = tbx.Ellipses(ax=ax)
```

![ellipses](https://mpltoolbox.readthedocs.io/en/latest/_images/ellipses_4_0.png)
