@@ -1041,7 +1041,7 @@ def get_position(self, original=False):
1041
1041
else :
1042
1042
locator = self .get_axes_locator ()
1043
1043
if not locator :
1044
- self .apply_aspect ()
1044
+ self ._apply_aspect ()
1045
1045
return self ._position .frozen ()
1046
1046
1047
1047
def set_position (self , pos , which = 'both' ):
@@ -1719,7 +1719,7 @@ def set_adjustable(self, adjustable, share=False):
1719
1719
and any (getattr (ax .get_data_ratio , "__func__" , None )
1720
1720
!= _AxesBase .get_data_ratio
1721
1721
for ax in axs )):
1722
- # Limits adjustment by apply_aspect assumes that the axes' aspect
1722
+ # Limits adjustment by _apply_aspect assumes that the axes' aspect
1723
1723
# ratio can be computed from the data limits and scales.
1724
1724
raise ValueError ("Cannot set Axes adjustable to 'datalim' for "
1725
1725
"Axes which override 'get_data_ratio'" )
@@ -1855,7 +1855,11 @@ def get_data_ratio(self):
1855
1855
ysize = max (abs (tymax - tymin ), 1e-30 )
1856
1856
return ysize / xsize
1857
1857
1858
+ @_api .deprecated ("3.6" , alternative = "Figure.draw_without_rendering" )
1858
1859
def apply_aspect (self , position = None ):
1860
+ self ._apply_aspect (position )
1861
+
1862
+ def _apply_aspect (self , position = None ):
1859
1863
"""
1860
1864
Adjust the Axes for a specified data aspect ratio.
1861
1865
@@ -2954,7 +2958,7 @@ def _update_title_position(self, renderer):
2954
2958
axs = self ._twinned_axes .get_siblings (self ) + self .child_axes
2955
2959
for ax in self .child_axes : # Child positions must be updated first.
2956
2960
locator = ax .get_axes_locator ()
2957
- ax .apply_aspect (locator (self , renderer ) if locator else None )
2961
+ ax ._apply_aspect (locator (self , renderer ) if locator else None )
2958
2962
2959
2963
for title in titles :
2960
2964
x , _ = title .get_position ()
@@ -3017,7 +3021,7 @@ def draw(self, renderer):
3017
3021
3018
3022
# loop over self and child Axes...
3019
3023
locator = self .get_axes_locator ()
3020
- self .apply_aspect (locator (self , renderer ) if locator else None )
3024
+ self ._apply_aspect (locator (self , renderer ) if locator else None )
3021
3025
3022
3026
artists = self .get_children ()
3023
3027
artists .remove (self .patch )
@@ -4382,7 +4386,7 @@ def get_tightbbox(self, renderer=None, call_axes_locator=True,
4382
4386
return None
4383
4387
4384
4388
locator = self .get_axes_locator ()
4385
- self .apply_aspect (
4389
+ self ._apply_aspect (
4386
4390
locator (self , renderer ) if locator and call_axes_locator else None )
4387
4391
4388
4392
for axis in self ._axis_map .values ():
0 commit comments