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.

figure_1

Also, this includes following fixes. I've also modified tests to check the number of errorbars actually drawn.

>>> 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