I would like to assign a full date plot with time for the x-axis in matplotlib, but with autoscaling I could only get times or dates, but not both. The following code:
import matplotlib.pyplot as plt import pandas as pd times = pd.date_range('2015-10-06', periods=500, freq='10min') fig, ax = plt.subplots(1) fig.autofmt_xdate() plt.plot(times, range(times.size)) plt.show()
And on the x axis, I get only times without any dates, so itβs difficult to take various measurements.
I think this is some kind of option in matplotlib in matplotlib.dates.AutoDateFormatter, but I could not find anyone that could allow me to change this autoscaling.

source share