mpltoolbox


Namempltoolbox JSON
Version 25.10.0 PyPI version JSON
download
home_pageNone
SummaryInteractive tools for Matplotlib
upload_time2025-10-10 21:26:47
maintainerNone
docs_urlNone
authorScipp contributors
requires_python>=3.11
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
[![PyPI badge](http://img.shields.io/pypi/v/mpltoolbox.svg)](https://pypi.python.org/pypi/mpltoolbox)
[![Anaconda-Server Badge](https://anaconda.org/conda-forge/mpltoolbox/badges/version.svg)](https://anaconda.org/conda-forge/mpltoolbox)
[![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/scipp/mpltoolbox/HEAD?labpath=docs%2Fdemo.ipynb)

# 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

```sh
python -m 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)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mpltoolbox",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": null,
    "author": "Scipp contributors",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/c7/41/ed7af89add46cd97d26adc98ef57cf8cd795f2117a128065784885a3b1ea/mpltoolbox-25.10.0.tar.gz",
    "platform": null,
    "description": "[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)\n[![PyPI badge](http://img.shields.io/pypi/v/mpltoolbox.svg)](https://pypi.python.org/pypi/mpltoolbox)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/mpltoolbox/badges/version.svg)](https://anaconda.org/conda-forge/mpltoolbox)\n[![License: BSD 3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/scipp/mpltoolbox/HEAD?labpath=docs%2Fdemo.ipynb)\n\n# Mpltoolbox\n\n## About\n\nMpltoolbox aims to provide some basic tools (that other libraries such as bokeh or plotly support) for drawing points, lines, rectangles, polygons on Matplotlib figures.\n\nThere are many interactive examples in the Matplotlib documentation pages,\nbut the code snippets are often long and potentially not straightforward to maintain.\n\nWith `mpltoolbox`, activating these tools should (hopefully) just be a one-liner.\n\n## Installation\n\n```sh\npython -m pip install mpltoolbox\n```\n\n## Examples\n\n```Py\nimport matplotlib.pyplot as plt\nimport mpltoolbox as tbx\n%matplotlib widget\n```\n\n### Points\n\n```Py\nfig, ax = plt.subplots()\nax.set_xlim(0, 100)\nax.set_ylim(0, 100)\n\npoints = tbx.Points(ax=ax)\n```\n\n![points](https://mpltoolbox.readthedocs.io/en/latest/_images/points_4_0.png)\n\n\n### Lines\n\n```Py\nfig, ax = plt.subplots()\nax.set_xlim(0, 100)\nax.set_ylim(0, 100)\n\nlines = tbx.Lines(ax=ax, n=2)\n```\n\n![lines](https://mpltoolbox.readthedocs.io/en/latest/_images/lines_4_0.png)\n\n### Rectangles\n\n```Py\nfig, ax = plt.subplots()\nax.set_xlim(0, 100)\nax.set_ylim(0, 100)\n\nrectangles = tbx.Rectangles(ax=ax)\n```\n\n![rects](https://mpltoolbox.readthedocs.io/en/latest/_images/rectangles_4_0.png)\n\n### Ellipses\n\n```Py\nfig, ax = plt.subplots()\nax.set_xlim(0, 100)\nax.set_ylim(0, 100)\n\nellipses = tbx.Ellipses(ax=ax)\n```\n\n![ellipses](https://mpltoolbox.readthedocs.io/en/latest/_images/ellipses_4_0.png)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Interactive tools for Matplotlib",
    "version": "25.10.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/scipp/mpltoolbox/issues",
        "Documentation": "https://scipp.github.io/mpltoolbox",
        "Source": "https://github.com/scipp/mpltoolbox"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c081128f9b5e4dad03768f598513baec8f4f1829c4b5503355d5dc0eee8fa75c",
                "md5": "0f7b01a7e60af9c33ca09c58ad8caabc",
                "sha256": "cc8fea5128d4f0241e826823790698645666eb2a0cb87061a05dcfcc83e6b2d2"
            },
            "downloads": -1,
            "filename": "mpltoolbox-25.10.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0f7b01a7e60af9c33ca09c58ad8caabc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 20679,
            "upload_time": "2025-10-10T21:26:45",
            "upload_time_iso_8601": "2025-10-10T21:26:45.360004Z",
            "url": "https://files.pythonhosted.org/packages/c0/81/128f9b5e4dad03768f598513baec8f4f1829c4b5503355d5dc0eee8fa75c/mpltoolbox-25.10.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c741ed7af89add46cd97d26adc98ef57cf8cd795f2117a128065784885a3b1ea",
                "md5": "09ee554af707348017d5f6a73dac417a",
                "sha256": "08ae7f15ec88ede8bfe25d21533c41c7012bc0d6993f72f34ddfae89bfd6ebef"
            },
            "downloads": -1,
            "filename": "mpltoolbox-25.10.0.tar.gz",
            "has_sig": false,
            "md5_digest": "09ee554af707348017d5f6a73dac417a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 315303,
            "upload_time": "2025-10-10T21:26:47",
            "upload_time_iso_8601": "2025-10-10T21:26:47.290593Z",
            "url": "https://files.pythonhosted.org/packages/c7/41/ed7af89add46cd97d26adc98ef57cf8cd795f2117a128065784885a3b1ea/mpltoolbox-25.10.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-10 21:26:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "scipp",
    "github_project": "mpltoolbox",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "mpltoolbox"
}
        
Elapsed time: 2.08183s