Revision: 4949
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4949&view=rev
Author:   jouni
Date:     2008-02-08 13:09:33 -0800 (Fri, 08 Feb 2008)

Log Message:
-----------
Fixed minor __str__ bugs so getp(gca()) works.

Modified Paths:
--------------
    trunk/matplotlib/CHANGELOG
    trunk/matplotlib/lib/matplotlib/axis.py
    trunk/matplotlib/lib/matplotlib/patches.py

Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG  2008-02-08 17:56:12 UTC (rev 4948)
+++ trunk/matplotlib/CHANGELOG  2008-02-08 21:09:33 UTC (rev 4949)
@@ -1,3 +1,5 @@
+2008-02-08 Fixed minor __str__ bugs so getp(gca()) works. - JKS
+
 2008-02-05 Added getters for title, xlabel, ylabel, as requested
            by Brandon Kieth - EF
 

Modified: trunk/matplotlib/lib/matplotlib/axis.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axis.py     2008-02-08 17:56:12 UTC (rev 
4948)
+++ trunk/matplotlib/lib/matplotlib/axis.py     2008-02-08 21:09:33 UTC (rev 
4949)
@@ -498,8 +498,8 @@
     OFFSETTEXTPAD = 3
 
     def __str__(self):
-        return str(self.__class__).split('.')[-1] \
-            + "(%d,%d)"%self.axes.transAxes.xy_tup((0,0))
+        return self.__class__.__name__ \
+            + "(%f,%f)"%tuple(self.axes.transAxes.transform_point((0,0)))
 
     def __init__(self, axes, pickradius=15):
         """

Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py  2008-02-08 17:56:12 UTC (rev 
4948)
+++ trunk/matplotlib/lib/matplotlib/patches.py  2008-02-08 21:09:33 UTC (rev 
4949)
@@ -344,8 +344,8 @@
     """
 
     def __str__(self):
-        return str(self.__class__).split('.')[-1] \
-            + "(%g,%g;%gx%g)" % tuple(self._bbox.bounds)
+        return self.__class__.__name__ \
+            + "(%g,%g;%gx%g)" % (self._x, self._y, self._width, self._height)
 
     def __init__(self, xy, width, height, **kwargs):
         """


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to