I try to use matplotlib to plot a dependency on dates (I use dates as X-values). As a result I get a plot with a huge number of x-ticks (dates) and these dates are overlapped such that one cannot recognize what date are there.
I read that the problem can appear of dates are not really date-objects but strings representing the dates (for example '2015-02-12'). However, I have really date-objects and it still does not work.
Here is my code:
plt.figure()
plt.xlim([date_1, date_2])
plt.xticks(rotation=90)
plt.plot(df['col1'].tolist(), df['col2'].tolist(), marker = 'o')
plt.savefig(fname)