I am still working on getting nice rounded datatime in xticks: rounding datetimes in xticks matplotlib
So the answer was fine, and I could use
plt.gca().xaxis.set_major_locator(mdates.HourLocator())
to get round hours in the xticks.
However, if I simply do
plt.gca().xaxis.set_major_locator(mdates.DateLocator())
it gives:
File "/python/anaconda-2.7.11-64/lib/python2.7/site-packages /matplotlib/ticker.py", line 1289, in __call__
raise NotImplementedError('Derived must override')
NotImplementedError: Derived must override
Is it really impossible to change HourLocator() to DateLocator() ?
I am using
matplotlib.__version__'2.0.2'