Description
Setup
matplotlib.__version__
= 1.5.1
matplotlib.__version__numpy__
= 1.6
Python 3.5.1, IPython 4.1.2 running under anaconda
OS: Red Hat 6.5
Matplotlib installed with conda install matplotlib
.
Issue
Supplying invalid drawstyle
parameter to plot
(and possible others) does not raise an error. I would expect the following not to work, but it does:
>>> import matplotlib.pyplot as plt
>>> plt.plot(range(5), range(5), drawstyle='mwahahahahaha')
For contrast, trying the same thing with fillstyle
raises the expected error:
>>> plt.plot(range(5), range(5), fillstyle='mwahahahahaha')
...
ValueError: Unrecognized fillstyle full left right bottom top none
Notes
The issue seems to be happening here:
matplotlib/lib/matplotlib/lines.py
Line 988 in 3ba9279
drawstyles = ('default', 'steps', 'steps-pre', 'steps-mid', 'steps-post')
if drawstyle not in drawstyles:
raise ValueError(' '.join(('Unrecognized drawstyle',) + drawstyles))
would mess up something or another. If not, I would be glad to make the change.
To help us understand and resolve your issue please check that you have provided
the information below.