Chapter 6. Plotting

Plotting in Python can be done with the pyplot part of the matplotlib module. With matplotlib you can create high-quality figures and graphics and also plot and visualize your results. Matplotlib is open source and freely available software, [21]. The matplotlib website also contains excellent documentation with examples, [35]. In this section, we will show you how to use the most common features. The examples in the upcoming sections assume that you have imported the module as:

from matplotlib.pyplot import *

In case you want to use the plotting commands in IPython, it is recommended that you run the magic command %matplotlib directly after starting the IPython shell. This prepares IPython for interactive plotting.

Basic plotting ...

Get Scientific Computing with Python 3 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.