Add TEXT to MATPLOTLIB figures || Python matplotlib text with plt.text() || Matplotlib Tips

Опубликовано: 08 Февраль 2021
на канале: Kimberly Fessel
13,882
421

Learn how to add matplotlib text with this matplotlib tips tutorial! I walk you through the basics of adding text to matplotlib, and then I show you several examples of text styling and usefulness. I discuss the three main arguments to plt.text: x-position, y-position, and the text string. Then I show you how to change the horizontal alignment or vertical alignment of your text. We go on to discuss styling with your pyplot text function through a series of examples, including changing the matplotlib text font size, the matplotlib text color, as well as how to include a matplotlib text box using the argument bbox. I close out with two very important concepts through examples: 1) adding text at a general position by leveraging the transform property and 2) adding text based on a variable. For the final example, I show you how to loop through a list of values and annotate a bar plot with text based on a variable.

0:00 Motivation
0:29 plt.text Basics
2:35 Text Styling: Font properties and bbox
5:37 Text at a General Position
7:36 Text by a Variable
10:39 Conclusion (vs plt.annotate)

Github Code:
https://github.com/kimfetti/Videos/bl...

Related Videos:
* Add a BASELINE to matplotlib:    • Add a baseline to a matplotlib figure...  
* Add LaTeX to matplotlib figures:    • Add math symbols to matplotlib figure...  
* Add SHAPES to matplotlib:    • Add shapes to matplotlib figures with...  
* Full Matplotlib Tips Playlist:    • Matplotlib Tips  

#matplotlibtips #matplotlib #dataviz


На этой странице сайта вы можете посмотреть видео онлайн Add TEXT to MATPLOTLIB figures || Python matplotlib text with plt.text() || Matplotlib Tips длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Kimberly Fessel 08 Февраль 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 13,882 раз и оно понравилось 421 зрителям. Приятного просмотра!