In our first Matplotlib example, namely matplotlib_1.py, we will import the dates module besides pyplot. We will use the matplotlib.dates module instead of the Python standard library dates module. Unlike the Python dates module, the mapplotlib.dates library will convert the date value internally into the float type, which is required by Matplotlib:
import matplotlib.pyplot as plt import matplotlib.dates as dates
In the script, we will create two empty lists, each representing the x-axis and y-axis values. Note that, on line 12, we used the built-in eval() Python function ...