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

API/FIX : don't accept None for x or y in plot #4352

Merged
merged 1 commit into from Apr 19, 2015

Conversation

tacaswell
Copy link
Member

This addresses #4339 by preventing it.

Other option are to convertNone -> np.nan.

@tacaswell tacaswell added this to the next point release milestone Apr 19, 2015
@@ -263,6 +263,14 @@ def _plot_args(self, tup, kwargs):
raise ValueError('third arg must be a format string')
else:
linestyle, marker, color = None, None, None

# check that n values of None are passed in
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"n" -> "no". Comment could be clarified a bit:

Don't allow any None values; a None would be converted
to a one-element array of None, which would fail downstream.

The comment is probably overkill; there was never any
reason to think None should be allowed, it just was
not explicitly blocked because we didn't attempt exhaustive
argument validation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to leave the comment as I started to solve this by forcing the input to be float-like, but that would break datetime support (and I suspect bunches of the unit-aware code).

@tacaswell
Copy link
Member Author

@efiring Wording fixed + doc + tests + squashed and rebased.

efiring added a commit that referenced this pull request Apr 19, 2015
API/FIX : don't accept None for x or y in plot
@efiring efiring merged commit a5e51ca into matplotlib:master Apr 19, 2015
@tacaswell tacaswell deleted the api_dontplot_None branch May 16, 2015 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants