Skip to main content

Documentation Status Gitter chat DOI PyPI version

adjustText - automatic label placement for matplotlib

Inspired by ggrepel package for R/ggplot2 (https://github.com/slowkow/ggrepel) Alt text

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/

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!

Metadata

Release files for adjustText 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adjustText 1.0.1
File Size Uploaded Provenance Actions
adjustText-1.0.1.tar.gz 12.1 kB Without provenance Details for adjustText-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for adjustText 1.0.1
File Interpreter ABI Platform Actions
adjustText-1.0.1-py3-none-any.whl Python 3 none any Details for adjustText-1.0.1-py3-none-any.whl

Total release size: 23.1 kB

Release files / adjustText-1.0.1.tar.gz

Download URL adjustText-1.0.1.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0f1acaf68af93f860e0c1c06631c6fb2507b75de7ce42866b97185c63fbc2d94
BLAKE2b-256 checksum
How to use checksums
a9ef3cc618b62dcffd970e6aaadd75e7fca88906ce687ac5e1d9e0406594a81c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / adjustText-1.0.1-py3-none-any.whl

Download URL adjustText-1.0.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7691ac6d1ed6931d5f63b8fba3d0f18ef9692d78cfe5b18daab6218587c9cf05
BLAKE2b-256 checksum
How to use checksums
95ab30deaddee25ce415c07b13b73abb800e5940100fad88dcc79a8e235c8654
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Security for adjustText 1.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page