Plotting in Python can be done with the pyplot part of the module Matplotlib. 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. 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.