Skip to content

ENH: Scatter plot now supports errorbar #6834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2014

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Apr 7, 2014

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.

  • 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

@jtratner
Copy link
Contributor

can you rebase this on top of master again, then we can review

@sinhrks
Copy link
Member Author

sinhrks commented Apr 24, 2014

Sure. Rebased.

@jreback
Copy link
Contributor

jreback commented Apr 27, 2014

@TomAugspurger can you give a look see

@jreback jreback added this to the 0.14.0 milestone Apr 27, 2014
@jreback
Copy link
Contributor

jreback commented Apr 27, 2014

@sinhrks need a release note for this pls

@sinhrks
Copy link
Member Author

sinhrks commented Apr 28, 2014

Rebased. I've thought release note is not requreid because error bar itself is new function of v0.14, and release note has following description. Should I prepare separate one?

Added error bar support to the .plot method of DataFrame and Series (:issue:3796)

@jreback
Copy link
Contributor

jreback commented Apr 28, 2014

oh just add this note number (or pr numbe) to that one

@sinhrks
Copy link
Member Author

sinhrks commented Apr 28, 2014

OK, added PR number.

@jreback
Copy link
Contributor

jreback commented May 1, 2014

@sinhrks @TomAugspurger

@TomAugspurger
Copy link
Contributor

Thanks @sinhrks. Could you rebase off master now that the Area plot is merged? There are a few conflicts in tools/plotting.py Other than the we're good.

@sinhrks
Copy link
Member Author

sinhrks commented May 2, 2014

@TomAugspurger Sure, rebased to latest master. Plotting test has been passed in Travis, and looks fail in offset test.

@jreback
Copy link
Contributor

jreback commented May 2, 2014

pls rebase 1 more time, master is fixed up

@sinhrks
Copy link
Member Author

sinhrks commented May 2, 2014

Thanks, rebased.

@TomAugspurger
Copy link
Contributor

Thanks.

@jreback a failure in pandas.io.tests.test_packers.TestNumpy and pandas.io.tests.test_packers.TestNumpy under the allowed failures build. Is this OK?

@jreback
Copy link
Contributor

jreback commented May 2, 2014

@TomAugspurger yeh...thouse fail every once in a while on 3.4, not really sure why. if you would like to investigate give it a go!

otherwise this PR is ok

TomAugspurger pushed a commit that referenced this pull request May 2, 2014
ENH: Scatter plot now supports errorbar
@TomAugspurger TomAugspurger merged commit 45e66eb into pandas-dev:master May 2, 2014
@TomAugspurger
Copy link
Contributor

Excellent. Thanks @sinhrks

@sinhrks sinhrks deleted the errorbar branch May 2, 2014 23:40
@rhshadrach rhshadrach mentioned this pull request Oct 11, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants