Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Possible bug in boxplot() #1027

Closed
Closed
@jairideout

Description

@jairideout

Hello,

I came across a strange boxplot that is generated with the following data:

from pylab import boxplot, savefig
bp = boxplot([2.88497, 1.2143, 0.923436, 1.18696])
show()

The boxplot has the non-outlier max below the upper quartile. I plotted the same data using R's boxplot function and it does not exhibit the same behavior. MPL's boxplot is plotting the max value as an outlier (the '+' sign) but then get confused about how to plot the quartiles and non-outlier max. This can be fixed by changing the whisker length to something more than 1.5 (the default) so that the outlier is seen as the max.

I'm not sure if this is a bug or not, but the boxplot doesn't look right to me using the default settings for boxplot(). I am using matplotlib 1.1.0 on Mac OS X 10.7.4.

Thanks,
Jai

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions