fig = plt.figure()
graph = fig.add_subplot(111)
graph.plot(x, y, 'r-o')
graph.set_xticks(x)
graph.set_xticklabels([date.strftime('%Y-%m-%d') for date, value in data])
plt.show()
How to plot data against specific dates on the x-axis using matplotlib