8000 added try except to check for valid iterable · matplotlib/matplotlib@93a2ad4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 93a2ad4

Browse files
committed
added try except to check for valid iterable
1 parent bcb2f11 commit 93a2ad4

1 file changed

+6
-0
lines changed

lib/matplotlib/lines.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,12 @@ def draw(self, renderer):
672672
elif iterable(markevery):
673673
#fancy indexing
674674
inds = markevery
675+
try:
676+
tpath.vertices[inds]
677+
except (ValueError, IndexError):
678+
raise ValueError('`markevery` is iterable but '
679+
'not a valid form of numpy fancy indexing; '
680+
'markevery=%s' % (markevery,))
675681
else:
676682
raise ValueError('Value of `markevery` is not '
677683
'recognized; '

0 commit comments

Comments
 (0)
0