ENH: Scatter plot now supports errorbar by sinhrks · Pull Request #6834 · pandas-dev/pandas (original) (raw)
This is enhancement for #5638. I sometimes want to plot scatter with errorbars, thus I've refactored to support it.
Also, this includes following fixes. I've also modified tests to check the number of errorbars actually drawn.
- There are some types which expected to work, but results in
ValueError
.float
(MPL can accept it)unicode
(in Python 2.x)- Other list-like, such as
iterator
- A bug related to time series.
>>> s = Series(rand(6), index=range(6), name='x')
>>> err_df = DataFrame(rand(6, 3) / 10, index=range(6), columns=['x', 'y', 'z'])
>>> s.plot(yerr=err_df) # This works, errorbar appears using err_df x column
>>> s.index = tm.makeDateIndex(k=6)
>>> s.plot(yerr=err_df) # But this doesn't, errorbar doesn't appear