alueError: ordinal must be >= 1

The error is due to matplotlib’s inability to find the location of x-axis value along the x-axis.

The plot from the first two lines has numeric values for x-axis, whereas the third line is trying to plot a datetime on the same axis. While plotting the third line plt.plot(Dates, Highs), matplotlib tries to find the x-axis location for the date and fails with the error.

Leave a Comment