@@ -1414,7 +1414,7 @@ class Ellipse(Patch):
1414
1414
A scale-free ellipse.
1415
1415
"""
1416
1416
def __str__ (self ):
1417
- pars = (self .xy [0 ], self .xy [1 ],
1417
+ pars = (self ._center [0 ], self ._center [1 ],
1418
1418
self .width , self .height , self .angle )
1419
1419
fmt = "Ellipse(xy=(%s, %s), width=%s, height=%s, angle=%s)"
1420
1420
return fmt % pars
@@ -1439,7 +1439,7 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs):
1439
1439
"""
1440
1440
Patch .__init__ (self , ** kwargs )
1441
1441
1442
- self .xy = xy
1442
+ self ._center = xy
1443
1443
self .width , self .height = width , height
1444
1444
self .angle = angle
1445
1445
self ._path = Path .unit_circle ()
@@ -1452,8 +1452,8 @@ def _recompute_transform(self):
1452
1452
makes it very important to call the accessor method and
1453
1453
not directly access the transformation member variable.
1454
1454
"""
1455
- center = (self .convert_xunits (self .xy [0 ]),
1456
- self .convert_yunits (self .xy [1 ]))
1455
+ center = (self .convert_xunits (self ._center [0 ]),
1456
+ self .convert_yunits (self ._center [1 ]))
1457
1457
width = self .convert_xunits (self .width )
1458
1458
height = self .convert_yunits (self .height )
1459
1459
self ._patch_transform = transforms .Affine2D () \
@@ -1477,14 +1477,14 @@ def set_center(self, xy):
1477
1477
1478
1478
ACCEPTS: (x, y)
1479
1479
"""
1480
- self .xy = xy
1480
+ self ._center = xy
1481
1481
self .stale = True
1482
1482
1483
1483
def get_center (self ):
1484
1484
"""
1485
1485
Return the center of the ellipse
1486
1486
"""
1487
- return self .xy
1487
+ return self ._center
1488
1488
1489
1489
center = property (get_center , set_center )
1490
1490
0 commit comments