Plotting

Plotting in Python can be done with the pyplot part of the module Matplotlib. With matplotlibyou can create high-quality figures and graphics and also plot and visualize your results. Matplotlib is open source and freely available software. The Matplotlib website also contains excellent documentation with examples, see 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.

6.1 Making plots ...

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