Matplotlib Legend Tutorial || matplotlib legend outside of graph || Matplotlib Tips

Publicado el: 18 enero 2021
en el canal de: Kimberly Fessel
19,132
447

This matplotlib legend tutorial walks you through basic and advanced options for matplotlib legends using Python code for a series of matplotlib legend examples. I start from the basics including making a matplotlib legend and the label argument. I show you how to change the matplotlib legend order, and then we thoroughly discuss the matplotlib legend location. I also demo how you can move the matplotlib legend outside of the graph. We move on to making a matplotlib legend horizontal using the ncol keyword argument. Finally, we talk about styling the matplotlib legend including changing the matplotlib legend fontsize, other font properties, the label color, removing the border with frameon, and adding a title to the legend. Last but not least, I show you how to change the matplotlib legend background color with the facecolor argument.

0:00 Introduction
0:24 Legend Basics
1:50 Change Legend Order
2:38 Legend Location
3:41 Legend Outside Plot
5:07 Horizontal Legends
6:13 Legend Font Size, Properties, Color
7:12 Legend Border, Title
7:40 Legend Background Color
7:54 Conclusion

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

Related Videos:
Full Matplotlib Tips Playlist:    • Matplotlib Tips  
How to SAVE a matplotlib figure and FIX TEXT CUTTING OFF:    • How to save a matplotlib figure and f...  

#matplotlibtips #matplotlib #dataviz


En esta página del sitio puede ver el video en línea Matplotlib Legend Tutorial || matplotlib legend outside of graph || Matplotlib Tips de Duración hora minuto segunda en buena calidad , que subió el usuario Kimberly Fessel 18 enero 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 19,132 veces y le gustó 447 a los espectadores. Disfruta viendo!