AdjustText
A small library for automatical adjustment of text position in matplotlib plots to minimize overlaps.
Install / Use
/learn @Phlya/AdjustTextREADME
adjustText - automatic label placement for matplotlib
Inspired by ggrepel package for R/ggplot2 (https://github.com/slowkow/ggrepel)

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!
Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
84.2kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
340.5kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.

