Skip to content

Summary

Summary

In this chapter, you learned how to create plots using Python and Matplotlib. You learned what Matplotlib is and why problem solvers should learn how to use Matplotlib. Matplotlib installation was shown at the start of the chapter. Then, you learned how to build line plots and save plots as image files. You learned how to customize plots by including axis label, titles, and legends on your plots. You also learned how to add annotations to plots.

Types of charts detailed in this chapter:

  • line plots

  • multi-line plots

  • bar graphs

  • pie charts

  • bar and line graphs with error bars

  • scatter plots

  • histograms

  • box plots and violin plots

  • contour plots

  • quiver plots

  • stream plots

  • 3D surface plots

  • 3D wire frame plots

  • 3D surface plots with projections

Key Terms and Concepts

plot

dpi

invoke

library

parameters

RGBA

object

attribute

object-oriented programming

method

image resolution

error bars

box plot

violin plot

histogram

annotation

reference frame

contour plot

quiver plot

stream plot

gradient

field

wire frame plot

projection

Additional Resources

Matplotlib official documentation: https://matplotlib.org/contents.html

Matplotlib summary notebook on Kaggle: https://www.kaggle.com/grroverpr/matplotlib-plotting-guide/notebook

Python Plotting With Matplotlib (Guide) on Real Python: https://realpython.com/python-matplotlib-guide/#why-can-matplotlib-be-confusing

Python For Data Science: Matplotlib Cheat Sheet from DataCamp: https://s3.amazonaws.com/assets.datacamp.com/blog_assets/Python_Matplotlib_Cheat_Sheet.pdf