Plotting with Matplotlib
Numbers in a table are hard to judge. A picture shows you the story in a second. You can see a loss that stopped falling, or one request that took ten times longer than the rest. Matplotlib is the standard Python library for drawing charts. In this lesson you will make line, scatter, bar and histogram charts from AI data. You will also learn how to pick the right chart.
New words
- Plot
- A chart drawn from your data.
- Figure
- The whole sheet of paper that charts are drawn on.
- Axes
- One chart on the figure, with an x axis and a y axis.
- Axis label
- The text that tells what an axis shows, with its unit.
- Legend
- A small key that tells which line is which.
- Histogram
- A chart that shows how many values fall in each range.
- Outlier
- A value far away from all the others.
What you will learn
- Why plot before you model
- Your first chart: a line plot
- Figure and axes, with titles and labels
- Several lines and a legend
- Scatter and bar charts
- Histograms: how values are spread
- Subplots: charts side by side
- Try it: which chart fits the question?
- Common mistakes
- Explain it to a friend
- Key takeaways
10 quiz questions at the end.
The full lesson, with interactive demos and the quiz, opens after you sign in with Google. It is free.