Skip to content
A small library for automatically adjustment of text position in matplotlib plots to minimize overlaps.
Jupyter Notebook Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
adjustText Fix bboxes Apr 8, 2019
docs DOC: add sphinx.ext.napoleon to have nice formating docstring Feb 6, 2019
figures moved Examples-for-multiple-subplots.ipynb to docs/source Jul 23, 2018
.gitignore doc build Apr 29, 2018
LICENSE Create LICENSE Jul 23, 2017 Update Jun 3, 2019
adjustText_logo.svg Up-to-date examples and logo by Christophe Van Neste Apr 29, 2018

Documentation Status Gitter chat DOI PyPI version

adjustText - automatic label placement for matplotlib

Inspired by ggrepel package for R/ggplot2 ( Alt text

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


Should be installable from pypi:

pip install adjustText

Or with conda:

conda install -c phlya adjusttext 

For the latest version from github:

pip install


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:

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 ( and a zenodo doi (see top of this page). Thank you!

You can’t perform that action at this time.