Q: Matplotlib - Weird Datetime format in axis after conversion I am trying to convert my axis labels from modified julian date (days since 1858-11-17) to a datetime. I got the conversion from float to datetime working, but when I try to format the axis labels just to display "%Y-%m-%d" I still get "%Y-%m-%d %H:%M:%S" in the axis label. 
Here is my conversion code:
import datetime
MJD0 = datetime.datetime(year=1858, month=11, day=17)

def ConvertMJDDateTime(MJD):
    return MJD0 + datetime.timedelta(days=int(MJD))

And my plot formatting code:
labels = ax1.get_xticks()
datetimes = [ConvertMJDDateTime(t) for t in labels]
ax1.set_xticklabels(datetimes)
fig.autofmt_xdate()
import matplotlib.dates as mdates
yearsFmt = mdates.DateFormatter('%Y-%m-%d')
ax1.format_xdata = yearsFmt

Thanks a bunch in advance.
