I have a simple dataframe that looks something like this (Year is the datetime index column):
Year A B
2018-01-01 1.049400 1.034076
2017-01-01 1.056371 1.032066
2016-01-01 1.063413 1.030055
I graph the data using:
df['A'].plot()
df['B'].plot()
And get this graph with date tick labels every 5 years.
How can I make the year ticks appear every 2 (or any other number) of years?



