@@ -1736,7 +1736,7 @@ def set_adjustable(self, adjustable, share=False):
1736
1736
and any (getattr (ax .get_data_ratio , "__func__" , None )
1737
1737
!= _AxesBase .get_data_ratio
1738
1738
for ax in axs )):
1739
- # Limits adjustment by _apply_aspect assumes that the axes' aspect
1739
+ # Limits adjustment by apply_aspect assumes that the axes' aspect
1740
1740
# ratio can be computed from the data limits and scales.
1741
1741
raise ValueError ("Cannot set Axes adjustable to 'datalim' for "
1742
1742
"Axes which override 'get_data_ratio'" )
@@ -1870,7 +1870,7 @@ def get_data_ratio(self):
1870
1870
ysize = max (abs (tymax - tymin ), 1e-30 )
1871
1871
return ysize / xsize
1872
1872
1873
- @_api .delete_parameter ("3.6 " , "position" )
1873
+ @_api .delete_parameter ("3.10 " , "position" )
1874
1874
def apply_aspect (self , position = None ):
1875
1875
"""
1876
1876
Adjust the Axes for a specified data aspect ratio.
@@ -1882,12 +1882,11 @@ def apply_aspect(self, position=None):
1882
1882
Parameters
1883
1883
----------
1884
1884
position : None or .Bbox
1885
-
1886
1885
If not ``None``, this defines the position of the
1887
1886
Axes within the figure as a Bbox. See `~.Axes.get_position`
1888
1887
for further details.
1889
1888
1890
- .. admonition :: Deprecated
1889
+ .. deprecated :: 3.10
1891
1890
1892
1891
Changing the *position* through ``apply_aspect`` is
1893
1892
considered internal API. This parameter will be removed
@@ -1918,6 +1917,19 @@ def _apply_aspect(self, position=None):
1918
1917
1919
1918
See the docstring of the public `apply_aspect` method.
1920
1919
1920
+ .. note::
1921
+
1922
+ It is somewhat surprising that "_apply_aspect" takes an optional
1923
+ position as input, which seems more functionality than what the
1924
+ name suggests.
1925
+
1926
+ Generally, applying an aspect will modify the size and position
1927
+ of an Axes. I haven't been able to reconstruct the history but
1928
+ assume, the fact that position is updated anyway was used to
1929
+ funnel additional position constraints into the already existing
1930
+ code. Likely, this function should better be called
1931
+ _update_geometry() nowadays.
1932
+
1921
1933
Parameters
1922
1934
----------
1923
1935
position : None or .Bbox
0 commit comments