@@ -810,7 +810,7 @@ def layout(
810
810
* ,
811
811
size : tuple [float , float ] | Default = default ,
812
812
engine : str | None | Default = default ,
813
- corners : tuple [float , float , float , float ] | Default = default ,
813
+ extent : tuple [float , float , float , float ] | Default = default ,
814
814
) -> Plot :
815
815
"""
816
816
Control the figure size and layout.
@@ -829,10 +829,10 @@ def layout(
829
829
engine : {{"tight", "constrained", None}}
830
830
Name of method for automatically adjusting the layout to remove overlap.
831
831
The default depends on whether :meth:`Plot.on` is used.
832
- corners : (left, bottom, right, top)
833
- Position of the layout corners , in fractions of the figure size.
834
- Corners are inclusive of axis decorations when using a layout engine,
835
- but they are exclusive when `engine=None`.
832
+ extent : (left, bottom, right, top)
833
+ Boundaries of the plot layout , in fractions of the figure size.
834
+ Note: the extent includes of axis decorations when using a layout engine,
835
+ but it is exclusive when `engine=None`.
836
836
837
837
Examples
838
838
--------
@@ -850,8 +850,8 @@ def layout(
850
850
new ._figure_spec ["figsize" ] = size
851
851
if engine is not default :
852
852
new ._layout_spec ["engine" ] = engine
853
- if corners is not default :
854
- new ._layout_spec ["corners " ] = corners
853
+ if extent is not default :
854
+ new ._layout_spec ["extent " ] = extent
855
855
856
856
return new
857
857
@@ -1810,13 +1810,13 @@ def _finalize_figure(self, p: Plot) -> None:
1810
1810
# TODO either way, make configurable
1811
1811
set_layout_engine (self ._figure , "tight" )
1812
1812
1813
- if (corners := p ._layout_spec .get ("corners " )) is not None :
1813
+ if (extent := p ._layout_spec .get ("extent " )) is not None :
1814
1814
engine = self ._figure .get_layout_engine ()
1815
1815
if engine is None :
1816
- self ._figure .subplots_adjust (* corners )
1816
+ self ._figure .subplots_adjust (* extent )
1817
1817
else :
1818
1818
# Note the different parameterization for the layout engine rect...
1819
- left , bottom , right , top = corners
1819
+ left , bottom , right , top = extent
1820
1820
width , height = right - left , top - bottom
1821
1821
try :
1822
1822
# The base LayoutEngine.set method doesn't have rect= so we need
0 commit comments