Skip to content

Commit

Permalink
BUG: Allowing unknown drawstyles. Fixes matplotlib#6143.
Browse files Browse the repository at this point in the history
Added a check that forbids `drawstyle` keywords that are not listed in the documentation.
  • Loading branch information
madphysicist committed Mar 11, 2016
1 parent 7f21cc5 commit 79e09c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/matplotlib/lines.py
Expand Up @@ -985,6 +985,8 @@ def set_drawstyle(self, drawstyle):
ACCEPTS: ['default' | 'steps' | 'steps-pre' | 'steps-mid' |
'steps-post']
"""
if drawstyle not in self.drawStyles:
raise ValueError(' '.join(('Unrecognized drawstyle',) + self.drawStyleKeys))
if self._drawstyle != drawstyle:
self.stale = True
self._drawstyle = drawstyle
Expand Down

0 comments on commit 79e09c0

Please sign in to comment.