Skip to content

Asymmetric error bars are not supported for series (only dataframes) #9536

Closed
@mizzao

Description

@mizzao

According to the documentation, asymmetric error bars should be able to be passed in to plot as an Mx2 array for a Series object or a Mx2xN array for a DataFrame object.

However, the code only seems to parse this correctly for a DataFrame: https://github.com/pydata/pandas/blob/master/pandas/tools/plotting.py#L1338

When passing raw error values as yerr, it seems that the first values are used as two-sided error differences, instead of being plotted as raw upper and lower values. Note the symmetric error bars below:

image

Using the underlying matplotlib function directly yields the expected results, but without the pandas-generated decorations:

image

This was originally noted in this StackOverflow question and I corroborated the other user's experience.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions