Skip to content
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

plt.errorbar error with empty list #5641

Closed
divenex opened this issue Dec 9, 2015 · 2 comments
Closed

plt.errorbar error with empty list #5641

divenex opened this issue Dec 9, 2015 · 2 comments
Assignees
Milestone

Comments

@divenex
Copy link

divenex commented Dec 9, 2015

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])
@tacaswell tacaswell added this to the Critical bugfix release (1.5.1) milestone Dec 9, 2015
@mdboom
Copy link
Member

mdboom commented Dec 9, 2015

Related to #5572, suggesting we need a general solution to this problem as hinted at in the comments over there.

@tacaswell
Copy link
Member

Were we just not laundering enough inputs through the unit frame work before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants