There are many solutions for plotting dates on the x-axis with matplotlib. A good one I found here (3.Answer) [Plotting dates on the x-axis with Python's matplotlib - Stack Overflow] **How do I get the graph with the x-axis and data displayed in a Tkinter canvas and not in the normal matplot window? **
import datetime as dt
dates = ['01/02/1991','01/03/1991','01/04/1991']
x = [dt.datetime.strptime(d,'%m/%d/%Y').date() for d in dates]
y = range(len(x))
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
plt.gca().xaxis.set_major_formatter(mdates.DateFormatter('%m/%d/%Y'))
plt.gca().xaxis.set_major_locator(mdates.DayLocator())
plt.plot(x,y)
plt.gcf().autofmt_xdate()
plt.show()
I searched in stackoverflow and in matplotlib examples and documentation. I found many solutions for drawing in canvas with matplotlib and also for drawing an x-axis with dates with matplotlib, but no solution for drawing an x-axis with dates with matplotlib in a tkinter canvas. I assume that this is not complicated. Nevertheless, I could not find a solution until now.