adjustText


NameadjustText JSON
Version 1.1.1 PyPI version JSON
download
home_pagehttps://github.com/Phlya/adjustText
SummaryIteratively adjust text position in matplotlib plots to minimize overlaps
upload_time2024-03-18 21:40:40
maintainer
docs_urlNone
authorIlya Flyamer
requires_python
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": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Ilya Flyamer",
    "author_email": "flyamer@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/31/33/1fbb4fd8b264be8d13f1ce48ef3866a13bc627d1b889d5577868c0621a12/adjustText-1.1.1.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.1.1",
    "project_urls": {
        "Documentation": "https://adjusttext.readthedocs.io/",
        "Homepage": "https://github.com/Phlya/adjustText"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7e983c53c56a3251bf92903d0ad817f0e73f98e42add91d585a9c26e67eac0b",
                "md5": "21c327480862c6d6345117fa47bdc4d6",
                "sha256": "ad2285f4239cd6c172508d772b026a133806deed9779977dfbeadcf233454938"
            },
            "downloads": -1,
            "filename": "adjustText-1.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "21c327480862c6d6345117fa47bdc4d6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11535,
            "upload_time": "2024-03-18T21:40:39",
            "upload_time_iso_8601": "2024-03-18T21:40:39.317352Z",
            "url": "https://files.pythonhosted.org/packages/e7/e9/83c53c56a3251bf92903d0ad817f0e73f98e42add91d585a9c26e67eac0b/adjustText-1.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31331fbb4fd8b264be8d13f1ce48ef3866a13bc627d1b889d5577868c0621a12",
                "md5": "dc8c8d9656290cda262928bdccabff72",
                "sha256": "e2c0975ef2c642478e60f4c03c5e9afbdeda7764336907ef69a9205bfa2d9896"
            },
            "downloads": -1,
            "filename": "adjustText-1.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "dc8c8d9656290cda262928bdccabff72",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14084,
            "upload_time": "2024-03-18T21:40:40",
            "upload_time_iso_8601": "2024-03-18T21:40:40.336842Z",
            "url": "https://files.pythonhosted.org/packages/31/33/1fbb4fd8b264be8d13f1ce48ef3866a13bc627d1b889d5577868c0621a12/adjustText-1.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-18 21:40:40",
    "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.20629s