-
- Notifications
You must be signed in to change notification settings - Fork 19.3k
Open
Labels
Description
xref #5774
When time series is set as index, line plot uses the TimeSeries_DateFormatter for recognizable date formatting. However, bar plot use the FixedFormatter which outputs the datetime as it is. Can bar plot also use the DateFormatter?
In [1]: from pandas import * In [2]: from numpy.random import * In [3]: ts = Series(randn(100), index=date_range('1/1/2000', periods=100)) In [4]: df = DataFrame(randn(100, 4), index=ts.index, columns=['A', 'B', 'C', 'D']) In [5]: df = df.cumsum() In [7]: a = df.plot(kind='bar') In [9]: a.get_xaxis().get_major_formatter() Out[9]: <matplotlib.ticker.FixedFormatter instance at 0x108700f38> In [11]: a = df.plot() In [12]: a.get_xaxis().get_major_formatter() Out[12]: <pandas.tseries.converter.TimeSeries_DateFormatter instance at 0x10877ccf8> pwaller, eipiminus1, lelandbatey, goyodiaz, bardram and 2 more