Included is a patch to change the behavior when legend() is called with
numpoints less than or equal to 0. Currently if one makes such a call, some
cryptic error messages are printed out and the plot is not generated.
The included patch produces a warning, and defaults to using numpoints = 4, so
the plot is actually made.
Paul Novak
---
--- legend.py 2008-02-01 19:14:24.0 -0600
+++ legend.py 2008-02-01 19:13:55.0 -0600
@@ -166,6 +166,12 @@
self._loc = loc
+if self.numpoints = 0:
+warnings.warn('legend() called with numpoints = %d. '
+ 'Default to numpoints = 4 because numpoints must be
greater than zero.' \
+ % (self.numpoints))
+self.numpoints = 4
+
self.legendPatch = Rectangle(
xy=(0.0, 0.0), width=0.5, height=0.5,
facecolor='w', edgecolor='k',
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users