I have a dataframe with one column of dtype datetime64. It contains dates from 2017/01/01 (Jan-2017) - 2018/04/01 (April-2018). I used matplotlib.pyplot to plot the dataframe with the Date column in X-axis. But the xticks are longer and overlaps resulting in a graph like this. How can I manage the xticks properly or use a different xtick that contains only month and year, Jan-17. The code I used for plotting:
plt.plot('Date','CODIn',data=df,marker='o',label='Influent')
plt.plot('Date','CODOut',data=df,marker='o',linestyle='dashed',label='Effluent')
plt.legend()