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

Skip to content

axes.bxp fails without fliers #7263

Closed
Closed
@jacobmj

Description

@jacobmj

I was trying to use the recent axes bxp() functionality with a list of statistics dictionaries. My dictionaries include only ['whislo', 'q1', 'med', 'q3', 'whishi'].

The documentation mentions that fliers is an optional key so long as showfliers=False. However the bxp function always accesses the fliers key, and accordingly throws a KeyError. The relevant access is as follows:

lib/matplotlib/axes/_axes.py#L3722-L3727

        for pos, width, stats in zip(positions, widths, bxpstats):
            # try to find a new label
            datalabels.append(stats.get('label', pos))
            # fliers coords
            flier_x = np.ones(len(stats['fliers'])) * pos
            flier_y = stats['fliers']

Metadata

Metadata

Assignees

Labels

Difficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions