diff --git a/lib/matplotlib/_tight_layout.py b/lib/matplotlib/_tight_layout.py index 81465f9b5db6..055f3fce04e4 100644 --- a/lib/matplotlib/_tight_layout.py +++ b/lib/matplotlib/_tight_layout.py @@ -41,8 +41,8 @@ def _auto_adjust_subplotpars( h_pad, w_pad : float Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to *pad*. - rect : tuple[float, float, float, float] - [left, bottom, right, top] in normalized (0, 1) figure coordinates. + rect : tuple + (left, bottom, right, top), default: None. """ rows, cols = shape @@ -183,8 +183,8 @@ def auto_adjust_subplotpars( h_pad, w_pad : float Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to *pad*. - rect : tuple[float, float, float, float] - [left, bottom, right, top] in normalized (0, 1) figure coordinates. + rect : tuple + (left, bottom, right, top), default: None. """ nrows, ncols = nrows_ncols span_pairs = [] @@ -262,8 +262,8 @@ def get_tight_layout_figure(fig, axes_list, subplotspec_list, renderer, h_pad, w_pad : float Padding (height/width) between edges of adjacent subplots. Defaults to *pad*. - rect : tuple[float, float, float, float], optional - (left, bottom, right, top) rectangle in normalized figure coordinates + rect : tuple (left, bottom, right, top), default: None. + rectangle in normalized figure coordinates that the whole subplots area (including labels) will fit into. Defaults to using the entire figure. diff --git a/lib/matplotlib/axes/_base.py b/lib/matplotlib/axes/_base.py index 6daad3ca450a..c1d3a8d97d23 100644 --- a/lib/matplotlib/axes/_base.py +++ b/lib/matplotlib/axes/_base.py @@ -582,7 +582,7 @@ def __init__(self, fig, rect, fig : `~matplotlib.figure.Figure` The Axes is built in the `.Figure` *fig*. - rect : [left, bottom, width, height] + rect : tuple (left, bottom, width, height). The Axes is built in the rectangle *rect*. *rect* is in `.Figure` coordinates. diff --git a/lib/matplotlib/figure.py b/lib/matplotlib/figure.py index 0b8ad9828b3d..d277c3045802 100644 --- a/lib/matplotlib/figure.py +++ b/lib/matplotlib/figure.py @@ -519,8 +519,8 @@ def add_axes(self, *args, **kwargs): Parameters ---------- - rect : sequence of float - The dimensions [left, bottom, width, height] of the new Axes. All + rect : tuple (left, bottom, width, height) + The dimensions (left, bottom, width, height) of the new Axes. All quantities are in fractions of figure width and height. projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', \ diff --git a/lib/matplotlib/gridspec.py b/lib/matplotlib/gridspec.py index 90d0b57b609b..bf1e2db11d2c 100644 --- a/lib/matplotlib/gridspec.py +++ b/lib/matplotlib/gridspec.py @@ -460,10 +460,10 @@ def tight_layout(self, figure, renderer=None, h_pad, w_pad : float, optional Padding (height/width) between edges of adjacent subplots. Defaults to *pad*. - rect : tuple of 4 floats, default: (0, 0, 1, 1), i.e. the whole figure + rect : tuple (left, bottom, right, top), default: None (left, bottom, right, top) rectangle in normalized figure coordinates that the whole subplots area (including labels) will - fit into. + fit into. Default (None) is the whole figure. """ subplotspec_list = _tight_layout.get_subplotspec_list( diff --git a/lib/matplotlib/layout_engine.py b/lib/matplotlib/layout_engine.py index fa4281a2ba02..f5a25eecae25 100644 --- a/lib/matplotlib/layout_engine.py +++ b/lib/matplotlib/layout_engine.py @@ -123,10 +123,9 @@ def __init__(self, *, pad=1.08, h_pad=None, w_pad=None, h_pad, w_pad : float Padding (height/width) between edges of adjacent subplots. Defaults to *pad*. - rect : tuple of 4 floats, optional - (left, bottom, right, top) rectangle in normalized figure - coordinates that the subplots (including labels) - will fit into. Defaults to using the entire figure. + rect : tuple (left, bottom, right, top), default: (0, 0, 1, 1). + rectangle in normalized figure coordinates that the subplots + (including labels) will fit into. """ super().__init__(**kwargs) for td in ['pad', 'h_pad', 'w_pad', 'rect']: diff --git a/lib/mpl_toolkits/mplot3d/axes3d.py b/lib/mpl_toolkits/mplot3d/axes3d.py index fb93342f49ae..38b86096b776 100644 --- a/lib/mpl_toolkits/mplot3d/axes3d.py +++ b/lib/mpl_toolkits/mplot3d/axes3d.py @@ -63,7 +63,7 @@ def __init__( ---------- fig : Figure The parent figure. - rect : (float, float, float, float) + rect : tuple (left, bottom, width, height), default: None. The ``(left, bottom, width, height)`` axes position. elev : float, default: 30 The elevation angle in degrees rotates the camera above and below