5 Graphics—Matplotlib

DOI: 10.1201/9781003256861-5

Chapter Objectives

  • Learn about the Matplotlib module and its pyplot submodule.
  • Be able to create scatter and line plots using pyplot.
  • Customize plot axes including the addition of a right-side axis.
  • Learn how to create subplots for multiple plots in a figure object.
  • Create and customize bar graphs with more flexibility than with pylab.
  • Explore creating other plots, such as polar plots, stem plots, and pie charts.
  • Learn how to create plots with logarithmic axis scales.
  • Be able to create contour and surface plots to depict two-dimensional data and functions.

In Chapter 3, you learned how to use the pylab module to create various plots. That module provides a convenient interface for many ...

Get Introduction to Engineering and Scientific Computing with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.