@@ -1131,14 +1131,20 @@ def __init__(self, xy, radius=5, **kwargs):
1131
1131
self .radius = radius
1132
1132
Ellipse .__init__ (self , xy , radius * 2 , radius * 2 , ** kwargs )
1133
1133
__init__ .__doc__ = cbook .dedent (__init__ .__doc__ ) % artist .kwdocd
1134
-
1135
- def radius ():
1136
- def fget (self ):
1137
- return self .width / 2.
1138
- def fset (self , radius ):
1139
- self .width = self .height = 2 * radius
1140
- return locals ()
1141
- radius = property (** radius ())
1134
+
1135
+ def set_radius (self , radius ):
1136
+ """
1137
+ Set the radius of the circle
1138
+
1139
+ ACCEPTS: float
1140
+ """
1141
+ self .width = self .height = 2 * radius
1142
+
1143
+ def get_radius (self ):
1144
+ 'return the radius of the circle'
1145
+ return self .width / 2.
1146
+
1147
+ radius = property (get_radius , set_radius )
1142
1148
1143
1149
class Arc (Ellipse ):
1144
1150
"""
@@ -2589,7 +2595,7 @@ def __init__(self, armA=0., armB=0., fraction=0.3, angle=None):
2589
2595
def connect (self , posA , posB ):
2590
2596
x1 , y1 = posA
2591
2597
x20 , y20 = x2 , y2 = posB
2592
-
2598
+
2593
2599
x12 , y12 = (x1 + x2 )/ 2. , (y1 + y2 )/ 2.
2594
2600
2595
2601
theta1 = math .atan2 (y2 - y1 , x2 - x1 )
@@ -2598,7 +2604,7 @@ def connect(self, posA, posB):
2598
2604
ddx , ddy = dx / dd , dy / dd
2599
2605
2600
2606
armA , armB = self .armA , self .armB
2601
-
2607
+
2602
2608
if self .angle is not None :
2603
2609
#angle = self.angle % 180.
2604
2610
#if angle < 0. or angle > 180.:
@@ -2622,7 +2628,7 @@ def connect(self, posA, posB):
2622
2628
2623
2629
else :
2624
2630
dl = 0.
2625
-
2631
+
2626
2632
#if armA > armB:
2627
2633
# armB = armA + dl
2628
2634
#else:
0 commit comments