Plotting time on the independent axis

Update: This answer is outdated since matplotlib version 3.5. The plot function now handles datetime data directly. See The use of plot_date is discouraged. This method exists for historic reasons and may be deprecated in the future. datetime-like data should directly be plotted using plot. If you need to plot plain numeric data as … Read more