@@ -1396,8 +1396,8 @@ def __init__(self, xy, width, height, angle=0, **kwargs):
13961396 Patch .__init__ (self , ** kwargs )
13971397
13981398 self ._center = xy
1399- self .width , self .height = width , height
1400- self .angle = angle
1399+ self ._width , self ._height = width , height
1400+ self ._angle = angle
14011401 self ._path = Path .unit_circle ()
14021402 # Note: This cannot be calculated until this is added to an Axes
14031403 self ._patch_transform = transforms .IdentityTransform ()
@@ -1413,8 +1413,8 @@ def _recompute_transform(self):
14131413 """
14141414 center = (self .convert_xunits (self ._center [0 ]),
14151415 self .convert_yunits (self ._center [1 ]))
1416- width = self .convert_xunits (self .width )
1417- height = self .convert_yunits (self .height )
1416+ width = self .convert_xunits (self ._width )
1417+ height = self .convert_yunits (self ._height )
14181418 self ._patch_transform = transforms .Affine2D () \
14191419 .scale (width * 0.5 , height * 0.5 ) \
14201420 .rotate_deg (self .angle ) \
@@ -1443,12 +1443,69 @@ def set_center(self, xy):
14431443
14441444 def get_center (self ):
14451445 """
1446- Return the center of the ellipse
1446+ Return the center of the ellipse.
14471447 """
14481448 return self ._center
14491449
14501450 center = property (get_center , set_center )
14511451
1452+ def set_width (self , width ):
1453+ """
1454+ Set the width of the ellipse.
1455+
1456+ Parameters
1457+ ----------
1458+ width : float
1459+ """
1460+ self ._width = width
1461+ self .stale = True
1462+
1463+ def get_width (self ):
1464+ """
1465+ Return the width of the ellipse.
1466+ """
1467+ return self ._width
1468+
1469+ width = property (get_width , set_width )
1470+
1471+ def set_height (self , height ):
1472+ """
1473+ Set the height of the ellipse.
1474+
1475+ Parameters
1476+ ----------
1477+ height : float
1478+ """
1479+ self ._height = height
1480+ self .stale = True
1481+
1482+ def get_height (self ):
1483+ """
1484+ Return the height of the ellipse.
1485+ """
1486+ return self ._height
1487+
1488+ height = property (get_height , set_height )
1489+
1490+ def set_angle (self , angle ):
1491+ """
1492+ Set the angle of the ellipse.
1493+
1494+ Parameters
1495+ ----------
1496+ angle : float
1497+ """
1498+ self ._angle = angle
1499+ self .stale = True
1500+
1501+ def get_angle (self ):
1502+ """
1503+ Return the angle of the ellipse.
1504+ """
1505+ return self ._angle
1506+
1507+ angle = property (get_angle , set_angle )
1508+
14521509
14531510class Circle (Ellipse ):
14541511 """
0 commit comments