Add shapes to matplotlib figures with matplotlib patches || Matplotlib Tips

Published: 14 December 2020
on channel: Kimberly Fessel
9,933
236

Learn how to add shapes with the matplotlib patches module in this Matplotlib Tips video. I demo how to import the Rectangle class from matplotlib patches and how to set the rectangles location, height, and width. I add the rectangle to the figure and show you how to turn off the matplotlib rectangle fill and change the angle. I also show you how to add a circle patch to your matplotlib figures. I talk about the applications of adding shapes, and I also mention other matplotlib patches: the ellipse and regular polygon.

0:00 Introduction - Dolphins!
0:32 Add a Rectangle
2:03 Add a Circle
3:07 Applications
3:30 More Shapes & Styles
3:55 Conclusion

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

Additional Resources:
** Matplotlib Patches Documentation -- https://matplotlib.org/api/patches_ap...
** Matplotlib Shape Gallery --https://matplotlib.org/3.3.3/gallery/...
** THE DOLPHIN -- https://matplotlib.org/3.1.1/gallery/...

Related Videos:
How to change the matplotlib FIGURE SIZE:    • How to change the matplotlib figure size w...  
How to change the AXES LIMITS of a matplotlib figure:    • How to change the axes limits of a matplot...  

#matplotlibtips #matplotlib #dataviz


On this page of the site you can watch the video online Add shapes to matplotlib figures with matplotlib patches || Matplotlib Tips with a duration of hours minute second in good quality, which was uploaded by the user Kimberly Fessel 14 December 2020, share the link with friends and acquaintances, this video has already been watched 9,933 times on youtube and it was liked by 236 viewers. Enjoy your viewing!