I've been debugging display issues when making bar charts of pandas dataframes.
Encountering a weird problem today:
index: <class 'pandas.tseries.index.DatetimeIndex'>
count 83.000
mean 0.000
std 0.879
min -2.159
25% -0.605
50% 0.001
75% 0.658
max 2.254
Name: error, dtype: float64
When I plot the data as a timeseries, it looks fine:
plt.plot(errors.index, errors.values)
But if I print it as a barchart, most of bars do not appear:
plt.bar(errors.index, errors.values)
plt.gcf().autofmt_xdate()
I thought there were too many bars of data for the barchart to nicely display, but this isn't true if I plot a bar directly from the dataframe:
errors.plot(kind="bar")
But then, the dataframe.plot doesn't handle so many bars well with the axis labeling... But it tells me that plt.bar should be able to display this.