@@ -1748,7 +1748,7 @@ def __init__(self, widths, heights, angles, *, units='points', **kwargs):
1748
1748
self ._widths = 0.5 * np .asarray (widths ).ravel ()
1749
1749
self ._heights = 0.5 * np .asarray (heights ).ravel ()
1750
1750
self ._angles = np .deg2rad (angles ).ravel ()
1751
- self ._units = units
1751
+ self ._length_units = units
1752
1752
self .set_transform (transforms .IdentityTransform ())
1753
1753
self ._transforms = np .empty ((0 , 3 , 3 ))
1754
1754
self ._paths = [mpath .Path .unit_circle ()]
@@ -1759,24 +1759,24 @@ def _set_transforms(self):
1759
1759
ax = self .axes
1760
1760
fig = self .figure
1761
1761
1762
- if self ._units == 'xy' :
1762
+ if self ._length_units == 'xy' :
1763
1763
sc = 1
1764
- elif self ._units == 'x' :
1764
+ elif self ._length_units == 'x' :
1765
1765
sc = ax .bbox .width / ax .viewLim .width
1766
- elif self ._units == 'y' :
1766
+ elif self ._length_units == 'y' :
1767
1767
sc = ax .bbox .height / ax .viewLim .height
1768
- elif self ._units == 'inches' :
1768
+ elif self ._length_units == 'inches' :
1769
1769
sc = fig .dpi
1770
- elif self ._units == 'points' :
1770
+ elif self ._length_units == 'points' :
1771
1771
sc = fig .dpi / 72.0
1772
- elif self ._units == 'width' :
1772
+ elif self ._length_units == 'width' :
1773
1773
sc = ax .bbox .width
1774
- elif self ._units == 'height' :
1774
+ elif self ._length_units == 'height' :
1775
1775
sc = ax .bbox .height
1776
- elif self ._units == 'dots' :
1776
+ elif self ._length_units == 'dots' :
1777
1777
sc = 1.0
1778
1778
else :
1779
- raise ValueError (f'Unrecognized units: { self ._units !r} ' )
1779
+ raise ValueError (f'Unrecognized units: { self ._length_units !r} ' )
1780
1780
1781
1781
self ._transforms = np .zeros ((len (self ._widths ), 3 , 3 ))
1782
1782
widths = self ._widths * sc
@@ -1790,7 +1790,7 @@ def _set_transforms(self):
1790
1790
self ._transforms [:, 2 , 2 ] = 1.0
1791
1791
1792
1792
_affine = transforms .Affine2D
1793
- if self ._units == 'xy' :
1793
+ if self ._length_units == 'xy' :
1794
1794
m = ax .transData .get_affine ().get_matrix ().copy ()
1795
1795
m [:2 , 2 :] = 0
1796
1796
self .set_transform (_affine (m ))
0 commit comments