adjustText


NameadjustText JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/Phlya/adjustText
SummaryIteratively adjust text position in matplotlib plots to minimize overlaps
upload_time2024-06-27 12:40:49
maintainerNone
docs_urlNone
authorIlya Flyamer
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements numpy matplotlib scipy
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <img src="https://github.com/Phlya/adjustText/blob/master/adjustText_logo.svg" width="183">

[![Documentation Status](https://readthedocs.org/projects/adjusttext/badge/?version=latest)](http://adjusttext.readthedocs.io/en/latest/?badge=latest)
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/adjustText/Lobby) 
[![DOI](https://zenodo.org/badge/49349828.svg)](https://zenodo.org/badge/latestdoi/49349828)
[![PyPI version](https://badge.fury.io/py/adjustText.svg)](https://badge.fury.io/py/adjustText)

# adjustText - automatic label placement for `matplotlib`

Inspired by **ggrepel** package for R/ggplot2 (https://github.com/slowkow/ggrepel) 
![Alt text](figures/mtcars.gif "Labelled mtcars dataset")

Alternative: **textalloc** https://github.com/ckjellson/textalloc

## Brief description

The idea is that often when we want to label multiple points on a graph the text will start heavily overlapping with both other labels and data points. This can be a major problem requiring manual solution. However this can be largely automatized by smart placing of the labels (difficult) or iterative adjustment of their positions to minimize overlaps (relatively easy). This library (well... script) implements the latter option to help with matplotlib graphs. Usage is very straightforward with usually pretty good results with no tweaking (most important is to just make text slightly smaller than default and maybe the figure a little larger). However the algorithm itself is highly configurable for complicated plots.

## Getting started

### Installation

Should be installable from pypi:
```
pip install adjustText
```
Or with `conda`:
```
conda install -c conda-forge adjusttext 
```

For the latest version from github:
```
pip install https://github.com/Phlya/adjustText/archive/master.zip
```

### Documentation

[Wiki] has some basic introduction, and more advanced usage examples can be found [here].

Thanks to Christophe Van Neste @beukueb, **adjustText** has a simple documentation:
http://adjusttext.readthedocs.io/en/latest/

[Wiki]: https://github.com/Phlya/adjustText/wiki
[here]: https://github.com/Phlya/adjustText/blob/master/docs/source/Examples.ipynb

## Citing **adjustText**

To cite the library if you use it in scientific publications (or anywhere else, if you wish), please use the link to the GitHub repository (https://github.com/Phlya/adjustText) and a zenodo doi (see top of this page). Thank you!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Phlya/adjustText",
    "name": "adjustText",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Ilya Flyamer",
    "author_email": "flyamer@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c2/5b/a08c34664bd363e1b42a125a5f254d83fde2d693db09a4896548759f1b7c/adjusttext-1.2.0.tar.gz",
    "platform": null,
    "description": "<img src=\"https://github.com/Phlya/adjustText/blob/master/adjustText_logo.svg\" width=\"183\">\n\n[![Documentation Status](https://readthedocs.org/projects/adjusttext/badge/?version=latest)](http://adjusttext.readthedocs.io/en/latest/?badge=latest)\n[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/adjustText/Lobby) \n[![DOI](https://zenodo.org/badge/49349828.svg)](https://zenodo.org/badge/latestdoi/49349828)\n[![PyPI version](https://badge.fury.io/py/adjustText.svg)](https://badge.fury.io/py/adjustText)\n\n# adjustText - automatic label placement for `matplotlib`\n\nInspired by **ggrepel** package for R/ggplot2 (https://github.com/slowkow/ggrepel) \n![Alt text](figures/mtcars.gif \"Labelled mtcars dataset\")\n\nAlternative: **textalloc** https://github.com/ckjellson/textalloc\n\n## Brief description\n\nThe idea is that often when we want to label multiple points on a graph the text will start heavily overlapping with both other labels and data points. This can be a major problem requiring manual solution. However this can be largely automatized by smart placing of the labels (difficult) or iterative adjustment of their positions to minimize overlaps (relatively easy). This library (well... script) implements the latter option to help with matplotlib graphs. Usage is very straightforward with usually pretty good results with no tweaking (most important is to just make text slightly smaller than default and maybe the figure a little larger). However the algorithm itself is highly configurable for complicated plots.\n\n## Getting started\n\n### Installation\n\nShould be installable from pypi:\n```\npip install adjustText\n```\nOr with `conda`:\n```\nconda install -c conda-forge adjusttext \n```\n\nFor the latest version from github:\n```\npip install https://github.com/Phlya/adjustText/archive/master.zip\n```\n\n### Documentation\n\n[Wiki] has some basic introduction, and more advanced usage examples can be found [here].\n\nThanks to Christophe Van Neste @beukueb, **adjustText** has a simple documentation:\nhttp://adjusttext.readthedocs.io/en/latest/\n\n[Wiki]: https://github.com/Phlya/adjustText/wiki\n[here]: https://github.com/Phlya/adjustText/blob/master/docs/source/Examples.ipynb\n\n## Citing **adjustText**\n\nTo cite the library if you use it in scientific publications (or anywhere else, if you wish), please use the link to the GitHub repository (https://github.com/Phlya/adjustText) and a zenodo doi (see top of this page). Thank you!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Iteratively adjust text position in matplotlib plots to minimize overlaps",
    "version": "1.2.0",
    "project_urls": {
        "Documentation": "https://adjusttext.readthedocs.io/",
        "Homepage": "https://github.com/Phlya/adjustText"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "710dbaaa8e9f8c14e33f353419f7c7da4c270145626f043e98740e743ece6a8e",
                "md5": "2134c8086a5f88a4fbd8e24a8c0cb2ce",
                "sha256": "53212d5ea02b224ba56a1929d30264c8f6ea35d18a39f0fc351cff0bca66a214"
            },
            "downloads": -1,
            "filename": "adjustText-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2134c8086a5f88a4fbd8e24a8c0cb2ce",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12226,
            "upload_time": "2024-06-27T12:40:47",
            "upload_time_iso_8601": "2024-06-27T12:40:47.122398Z",
            "url": "https://files.pythonhosted.org/packages/71/0d/baaa8e9f8c14e33f353419f7c7da4c270145626f043e98740e743ece6a8e/adjustText-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c25ba08c34664bd363e1b42a125a5f254d83fde2d693db09a4896548759f1b7c",
                "md5": "665aec32e5d8b6f34fd0c66209af68f8",
                "sha256": "d76f509f0dbc1ccd2fb28908364427f0dccfc4bc95a5f466b228209a10585e18"
            },
            "downloads": -1,
            "filename": "adjusttext-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "665aec32e5d8b6f34fd0c66209af68f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14756,
            "upload_time": "2024-06-27T12:40:49",
            "upload_time_iso_8601": "2024-06-27T12:40:49.819304Z",
            "url": "https://files.pythonhosted.org/packages/c2/5b/a08c34664bd363e1b42a125a5f254d83fde2d693db09a4896548759f1b7c/adjusttext-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-27 12:40:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Phlya",
    "github_project": "adjustText",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "numpy",
            "specs": []
        },
        {
            "name": "matplotlib",
            "specs": []
        },
        {
            "name": "scipy",
            "specs": []
        }
    ],
    "lcname": "adjusttext"
}
        
Elapsed time: 0.46634s