0

I want to display data from a data frame where the index are dates. I want to have a tick per month. I want the ticks to be : -jan. -feb. ... -nov. -dec.

By default the ticks are : - jan. -march -may ... (does'nt display every month)

I have imposed a month format for the ticks and a 45 degrees rotation. I have try :

ax1.locator_params(nbins=12, axis='x')

That is supposed to make 12 ticks but noting is changing.

Upil
  • 3
  • 2

1 Answers1

0
import matplotlib.dates as mdates


months = mdates.MonthLocator()  # every month
ax.xaxis.set_major_locator(months)

Try this

Gpsy
  • 100
  • 11