Revision: 7133
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7133&view=rev
Author:   jdh2358
Date:     2009-05-22 14:24:55 +0000 (Fri, 22 May 2009)

Log Message:
-----------
modified Tony's patch to coimply w/ mpl properties

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

Modified: trunk/matplotlib/lib/matplotlib/patches.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/patches.py  2009-05-22 14:22:03 UTC (rev 
7132)
+++ trunk/matplotlib/lib/matplotlib/patches.py  2009-05-22 14:24:55 UTC (rev 
7133)
@@ -1131,15 +1131,21 @@
         self.radius = radius
         Ellipse.__init__(self, xy, radius*2, radius*2, **kwargs)
     __init__.__doc__ = cbook.dedent(__init__.__doc__) % artist.kwdocd
-    
-    def radius():
-        def fget(self):
-            return self.width / 2.
-        def fset(self, radius):
-            self.width = self.height = 2 * radius
-        return locals()
-    radius = property(**radius())
 
+    def set_radius(self, radius):
+        """
+        Set the radius of the circle
+
+        ACCEPTS: float
+        """
+        self.width = self.height = 2 * radius
+
+    def get_radius(self):
+        'return the radius of the circle'
+        return self.width / 2.
+
+    radius = property(get_radius, set_radius)
+
 class Arc(Ellipse):
     """
     An elliptical arc.  Because it performs various optimizations, it
@@ -2589,7 +2595,7 @@
         def connect(self, posA, posB):
             x1, y1 = posA
             x20, y20 = x2, y2 = posB
-             
+
             x12, y12 = (x1 + x2)/2., (y1 + y2)/2.
 
             theta1 = math.atan2(y2-y1, x2-x1)
@@ -2598,7 +2604,7 @@
             ddx, ddy = dx/dd, dy/dd
 
             armA, armB = self.armA, self.armB
-            
+
             if self.angle is not None:
                 #angle = self.angle % 180.
                 #if angle < 0. or angle > 180.:
@@ -2622,7 +2628,7 @@
 
             else:
                 dl = 0.
-                
+
             #if armA > armB:
             #    armB = armA + dl
             #else:


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

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to