Skip to content

DF Plots: Error bars don't allow to set styles #7023

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

Open
Zaharid opened this issue May 1, 2014 · 6 comments
Open

DF Plots: Error bars don't allow to set styles #7023

Zaharid opened this issue May 1, 2014 · 6 comments
Labels

Comments

@Zaharid
Copy link

Zaharid commented May 1, 2014

With this code the style spec 'o' is ignored when plotting error bars (#5638):

In [25]: from numpy.random import randn

In [26]: import pandas as pd

In [27]: df = pd.DataFrame(randn(8,3), columns = "A B yerr".split())

In [28]: df.plot(x='A', y='B',style='o' ,yerr='yerr')
Out[28]: <matplotlib.axes.AxesSubplot at 0x5259cd0>

In [29]: pd.__version__
Out[29]: '0.13.1-791-g07f6d46'
@Zaharid Zaharid changed the title DD Plots: Error bars don't allow to set styles DF Plots: Error bars don't allow to set styles May 1, 2014
@TomAugspurger
Copy link
Contributor

Thanks for the report. Any fix for this will have to follow #6834 which is refactoring the error bar code (doesn't fix this though). The style kwarg is checked for when plotting the error bars and removed since it isn't supported, but I think that it should just not style the actual error bars. The plot itself should still be styled.

@jreback jreback added this to the 0.14.1 milestone May 2, 2014
@jreback jreback modified the milestones: 0.15.0, 0.14.1 Jun 17, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@cwwalter
Copy link

cwwalter commented Apr 1, 2015

I found this bug while trying to solve this problem. I'm new to trying to plot with Pandas. Although the style command does not work, you can still do what you want by using the fmt command like so:

data.query('config==0').plot('numElectrons', 'stdX', yerr='errX', fmt='ko', label='Perfect X')

@dashesy
Copy link
Contributor

dashesy commented May 22, 2015

fmt workaround does not work if subplots is used

@MarineF
Copy link

MarineF commented May 23, 2016

fmt workaround also does not work when we need to modify line property such as in:
df.plot(style=['k:', 'k--', 'k-'], yerr=error_df)

@Octoshape
Copy link

Is this ever going to be fixed?

@TomAugspurger
Copy link
Contributor

TomAugspurger commented Dec 7, 2017 via email

@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
8 participants