Automatically Update Matplotlib Text Position with Python adjustText to Avoid Overlaps

Published: 16 August 2021
on channel: Kimberly Fessel
7,251
190

Automatically update the text on your Matplotlib or seaborn figures so it doesn't overlap with adjustText! In this Python Matplotlib tips video, I show you how to use a Python package called adjustText to automatically update your Matplotlib text position so that the text doesn't overlap. First I answer, "What is adjustText?" Then I show you how to get adjusttext using "pip install adjustText". Next, we walk through the code basics: how to import python adjusttext and how to use it to update your Matplotlib text annotation so that they don't overlap or hang outside of the figure. I also demo using adjusttext to update seaborn text through plt.text. I describe how adjustText works in an iterative process. Then I show you how to do other things with adjustText like adding arrows, using expand_points to avoid large markers, and saving each iteration as a figure so you can make your own GIF. Join me to learn about Python adjustText and save yourself the hassle of manually updating your Matplotlib text placement.

0:00 Introduction
0:26 What is adjustText?
0:46 Install adjustText
1:03 Code Basics
3:30 adjustText with seaborn
5:54 How does adjustText work?
6:46 Add Arrows
7:56 Expand Points
8:55 Make your own GIF!
10:51 bl00pers

// More adjustText EXAMPLES:
https://github.com/Phlya/adjustText/b...

// GitHub CODE:
https://github.com/kimfetti/Videos/bl...
https://github.com/Phlya/adjustText

// Related VIDEOS:
Add Text to Matplotlib Figures -    • Add TEXT to MATPLOTLIB figures || Python m...  
Seaborn scatterplot -    • Seaborn scatter plot | How to make and sty...  
Full MATPLOTLIB TIPS Playlist -    • Matplotlib Tips  

#dataviz #matplotlib #adjusttext


On this page of the site you can watch the video online Automatically Update Matplotlib Text Position with Python adjustText to Avoid Overlaps with a duration of hours minute second in good quality, which was uploaded by the user Kimberly Fessel 16 August 2021, share the link with friends and acquaintances, this video has already been watched 7,251 times on youtube and it was liked by 190 viewers. Enjoy your viewing!