Section 1 - Instruction

Welcome! A plot is a picture of your data that helps you see patterns a table of numbers can't show. To create plots in Python, we use a powerful library called Matplotlib.

Engagement Message

What makes a visual pattern easier to recognize than a numerical one?

Section 2 - Instruction

To get started, we need to import the library. Just as we use import pandas as pd, the standard convention for Matplotlib's plotting interface is:

import matplotlib.pyplot as plt

Engagement Message

From now on, we'll use plt to refer to Matplotlib, sound good?

Section 3 - Instruction

Every plot begins with a Figure and Axes. Think of the Figure as the entire canvas or window. The Axes is the specific area inside the canvas where your data will actually be plotted.

Engagement Message

What is the relationship between a picture frame and the photo inside it?

Section 4 - Instruction

We create the Figure and Axes with one simple command:

fig, ax = plt.subplots()

This creates a blank canvas (fig) and a plotting area (ax) for us to work with. ax is the object we'll use to create our bars, lines, and points.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal