Python Plotting With Matplotlib

Austin Cepalia

A picture is worth a thousand words, and with Python’s matplotlib library, it fortunately takes far less than a thousand words of code to create a production-quality graphic.

However, matplotlib is also a massive library, and getting a plot to look just right is often achieved through trial and error. Using one-liners to generate basic plots in matplotlib is relatively simple, but skillfully commanding the remaining 98% of the library can be daunting.

In this beginner-friendly course, you’ll learn about plotting in Python with matplotlib by looking at the theory and following along with practical examples. While learning by example can be tremendously insightful, it helps to have even just a surface-level understanding of the library’s inner workings and layout as well.

By the end of this course, you’ll:

  • Know the differences between PyLab and Pyplot
  • Grasp the key concepts in the design of matplotlib
  • Understand plt.subplots()
  • Visualize arrays with matplotlib
  • Plot by combining pandas and matplotlib

This course assumes you know a tiny bit of NumPy. You’ll mainly use the numpy.random module to generate “toy” data, drawing samples from different statistical distributions. If you don’t already have matplotlib installed, see the documentation for a walkthrough before proceeding.

What’s Included:

Related Learning Paths:

About Austin Cepalia

Austin is a video tutorial author at Real Python. He's currently a student working towards a degree in computer science at Rochester Institute of Technology.

» More about Austin

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Participant Comments

Glenn Lehman on Sept. 13, 2021

Great learning experience!

I appreciated the advise to type out all the code. This allowed me to modify some of the items and see how this changed the output. Plus my typing skills allowed me to practice some basic debugging.

Thank you.

« Browse All Courses