#----------------------------
import matplotlib.pyplot as plt
ax = plt.subplot(1,1,1)
ax.plot(1, 2, label='foo')
ax.legend(numpoints=0)
#----------------------------
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 4044, in legend
self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/legend.py", line 226,
in __init__
raise ValueError("numpoints must be >= 0; it was %d"% numpoints)
ValueError: numpoints must be >= 0; it was 0
The exception message doesn't match the condition that raises it. I
think it should say "numpoints must be > 0". I'm using matplotlib
version 0.99.3.
Steve
|