Skip to content

plt.errorbar error with empty list #5641

Closed
@divenex

Description

@divenex

The command below returns an error in Matplotlib 1.5.0

plt.errorbar([], [], xerr=[], yerr=[])

Even tough

plt.errorbar([], [])

works as expected.

When the x and y coordinates are empty lists, It would make sense for the command to accept empty xerr and yerr keywords as well, without throwing an error, as in the previous Matplotlib version. In fact the empty lists will likely come from code like the following, where np.any(mask)==False

mask = y > 0
plt.errorbar(x[mask], y[mask], xerr=xerr[mask], yerr=yerr[mask])

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions