Skip to content
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

ENH: plot.scatter should pass errorbar keyword args #46952

Open
selasley opened this issue May 6, 2022 · 0 comments
Open

ENH: plot.scatter should pass errorbar keyword args #46952

selasley opened this issue May 6, 2022 · 0 comments

Comments

@selasley
Copy link
Contributor

selasley commented May 6, 2022

Is your feature request related to a problem?

Scatter plots do not accept errorbar keyword arguments such as capsize, elinewidth, etc

Describe the solution you'd like

plot.scatter should pass keyword arguments specific to matplotlib's errorbar function to errobar() so errorbars can be customized.

API breaking implications

None?

Describe alternatives you've considered

Instead of passing xerr or yerr to plot.scatter and letting pandas plot errorbars, call ax.errobar manually after ax = plot.scatter

Additional context

df = pd.DataFrame(data={'x': [0, 1, 2, 3, 4, 5, 6],
                        'y': [0, 2, 5, 4, 7, 6, 11],
                        'yerr': [1, .2, .3, .4, .5, .6, .5],
                        'xerr': [.5, .6, .5, 1, .2, .3, .4, ]},
                  )
df.plot(kind='scatter', x='x', y='y', xerr='xerr', yerr='yerr',
        s=60, fc='none', ec='r',
        capsize=3, elinewidth=0.5, ecolor='b', errorevery=2)

AttributeError: 'PathCollection' object has no property 'capsize'
@selasley selasley added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels May 6, 2022
selasley added a commit to selasley/pandas that referenced this issue May 6, 2022
selasley added a commit to selasley/pandas that referenced this issue May 6, 2022
@mzeitlin11 mzeitlin11 added this to the 1.5 milestone May 7, 2022
@mzeitlin11 mzeitlin11 added Visualization plotting and removed Needs Triage Issue that has not been reviewed by a pandas team member labels May 7, 2022
@mzeitlin11 mzeitlin11 changed the title ENH: ENH: plot.scatter should pass errorbar keyword args May 7, 2022
selasley added a commit to selasley/pandas that referenced this issue May 7, 2022
@mroeschke mroeschke removed this from the 1.5 milestone Aug 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants