The following plot
import matplotlib
f= plt.figure(figsize=(12,4))
ax = f.add_subplot(111)
df.set_index('timestamp')['values'].plot(ax=ax)
ax.xaxis.set_major_locator(matplotlib.dates.HourLocator(interval=1))
ax.xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%I'))
plt.show()
Renders the hour in the wrong zone (GMT) even though I have:
> df['timestamp'][0]
Timestamp('2014-09-02 18:37:00-0400', tz='US/Eastern')
As a matter of fact, if I comment out the line:
ax.xaxis.set_major_formatter(matplotlib.dates.DateFormatter('%I'))
the hour is rendered in the right time zone.
Why?