This recipe presents the basic kind of plot generated by Matplotlib: a two-dimensional display, with axes, where datasets and functional relationships are represented by lines. Besides the data being displayed, a good graph will contain a title (caption), axes labels, and, perhaps, a legend identifying each line in the plot.
Creating two-dimensional plots of functions and data
Getting ready
Start Jupyter and run the following commands in an execution cell:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
How to do it…
Run the following code in...