From ae35f41d4db6168763053b58285a8d0b1a250bac Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 17 Jul 2023 11:01:22 +0200 Subject: [PATCH] Clarify that ImageGrid requires limits-sharing. ... based on the use of AxesX and AxesY in the axes_locators it creates in _init_locators. --- lib/mpl_toolkits/axes_grid1/axes_grid.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/mpl_toolkits/axes_grid1/axes_grid.py b/lib/mpl_toolkits/axes_grid1/axes_grid.py index 42e9d4de0291..720d985414ff 100644 --- a/lib/mpl_toolkits/axes_grid1/axes_grid.py +++ b/lib/mpl_toolkits/axes_grid1/axes_grid.py @@ -277,7 +277,14 @@ def get_axes_locator(self): class ImageGrid(Grid): - # docstring inherited + """ + A grid of Axes for Image display. + + This class is a specialization of `~.axes_grid1.axes_grid.Grid` for displaying a + grid of images. In particular, it forces all axes in a column to share their x-axis + and all axes in a row to share their y-axis. It further provides helpers to add + colorbars to some or all axes. + """ def __init__(self, fig, rect, @@ -316,7 +323,9 @@ def __init__(self, fig, Padding or (horizontal padding, vertical padding) between axes, in inches. share_all : bool, default: False - Whether all axes share their x- and y-axis. + Whether all axes share their x- and y-axis. Note that in any case, + all axes in a column share their x-axis and all axes in a row share + their y-axis. aspect : bool, default: True Whether the axes aspect ratio follows the aspect ratio of the data limits.