Skip to content

Commit

Permalink
API/FIX : don't accept None for x or y in plot
Browse files Browse the repository at this point in the history
This addresses #4339 by preventing it.
  • Loading branch information
tacaswell committed Apr 19, 2015
1 parent 6586369 commit fd534e1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/matplotlib/axes/_base.py
Expand Up @@ -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
# this will be upconverted to a one element array
# of None, which will cause problems later when
# we try to draw.
if any(v is None for v in tup):
raise ValueError("x and y must not be None")

kw = {}
for k, v in zip(('linestyle', 'marker', 'color'),
(linestyle, marker, color)):
Expand Down

0 comments on commit fd534e1

Please sign in to comment.