To use a chart date with several trends, it is easiest to call it several times. For instance:
import datetime import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates

Alternatively, you can use one call to plot (rather than plot_date ) and then call plt.gca().xaxis_date() if you want. plot_date just calls plot , and then ax.xaxis_date() .
source share