From: <ef...@us...> - 2008-02-04 07:25:14
|
Revision: 4937 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4937&view=rev Author: efiring Date: 2008-02-03 23:25:08 -0800 (Sun, 03 Feb 2008) Log Message: ----------- Raise ValueError if legend is called with invalid numpoints (Paul Novak) Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/legend.py Modified: trunk/matplotlib/lib/matplotlib/legend.py =================================================================== --- trunk/matplotlib/lib/matplotlib/legend.py 2008-02-04 06:50:00 UTC (rev 4936) +++ trunk/matplotlib/lib/matplotlib/legend.py 2008-02-04 07:25:08 UTC (rev 4937) @@ -122,6 +122,8 @@ if value is None: value=rcParams["legend."+name] setattr(self,name,value) + if self.numpoints <= 0: + raise ValueError("numpoints must be >= 0; it was %d"% numpoints) if prop is None: self.prop=FontProperties(size=rcParams["legend.fontsize"]) else: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |