legend.py "ValueError: numpoints must be >= 0; it was 0"

import matplotlib.pyplot as plt
fig = plt.figure()
ax = plt.subplot(1,1,1)
ax.plot(1.1, 2.2, label=‘foo’)

ax.legend(numpoints=0)

ValueError: numpoints must be >= 0; it was 0

In legend.init 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

legend.py.diff (482 Bytes)