I just updated matplotlib from svn and here is traceback I get after calling
legend with the pad argument:
/usr/local/lib64/python2.5/site-packages/matplotlib/pyplot.pyc in
legend(*args, **kwargs)
2390 def legend(*args, **kwargs):
2391
-> 2392 ret = gca().legend(*args, **kwargs)
2393 draw_if_interactive()
2394 return ret
/usr/local/lib64/python2.5/site-packages/matplotlib/axes.pyc in legend(self,
*args, **kwargs)
3662
3663 handles = cbook.flatten(handles)
-> 3664 self.legend_ = mlegend.Legend(self, handles, labels,
**kwargs)
3665 return self.legend_
3666
/usr/local/lib64/python2.5/site-packages/matplotlib/legend.pyc in
__init__(self, parent, handles, labels, loc, numpoints, prop, pad,
borderpad, markerscale, labelsep, handlelen, handletextsep, axespad, shadow)
125 setattr(self,name,value)
126 if pad:
--> 127 warnings.DeprecationWarning("Use 'borderpad' instead of
'pad'.")
128 # 2008/10/04
129 if self.numpoints <= 0:
AttributeError: 'module' object has no attribute 'DeprecationWarning'
This is with python2.5.
Here is a patch:
Index: lib/matplotlib/legend.py
===================================================================
--- lib/matplotlib/legend.py (revision 6171)
+++ lib/matplotlib/legend.py (working copy)
@@ -124,7 +124,7 @@
value=rcParams["legend."+name]
setattr(self,name,value)
if pad:
- warnings.DeprecationWarning("Use 'borderpad' instead of
'pad'.")
+ DeprecationWarning("Use 'borderpad' instead of 'pad'.")
# 2008/10/04
if self.numpoints <= 0:
raise ValueError("numpoints must be >= 0; it was %d"%
numpoints)
Regards,
David
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel