From 555e73784c31258131ade61b22d2b4abbdd14245 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Mon, 25 Nov 2024 10:37:39 +0100 Subject: [PATCH] Minor tweaks to image docs. --- lib/matplotlib/image.py | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/lib/matplotlib/image.py b/lib/matplotlib/image.py index f73bd3af6acb..53ea452f4c84 100644 --- a/lib/matplotlib/image.py +++ b/lib/matplotlib/image.py @@ -234,17 +234,18 @@ class _ImageBase(mcolorizer.ColorizingArtist): """ Base class for images. - interpolation and cmap default to their rc settings + *interpolation* and *cmap* default to their rc settings. - cmap is a colors.Colormap instance - norm is a colors.Normalize instance to map luminance to 0-1 + *cmap* is a `.colors.Colormap` instance. + *norm* is a `.colors.Normalize` instance to map luminance to 0-1. - extent is data axes (left, right, bottom, top) for making image plots - registered with data plots. Default is to label the pixel - centers with the zero-based row and column indices. + *extent* is a ``(left, right, bottom, top)`` tuple in data coordinates, for + making image plots registered with data plots; the default is to label the + pixel centers with the zero-based row and column indices. - Additional kwargs are matplotlib.artist properties + Additional kwargs are `.Artist` properties. """ + zorder = 0 def __init__(self, ax, @@ -733,11 +734,10 @@ def set_interpolation_stage(self, s): Parameters ---------- - s : {'data', 'rgba', 'auto'} or None - Whether to apply up/downsampling interpolation in data or RGBA - space. If None, use :rc:`image.interpolation_stage`. - If 'auto' we will check upsampling rate and if less - than 3 then use 'rgba', otherwise use 'data'. + s : {'data', 'rgba', 'auto'}, default: :rc:`image.interpolation_stage` + Whether to apply resampling interpolation in data or RGBA space. + If 'auto', 'rgba' is used if the upsampling rate is less than 3, + otherwise 'data' is used. """ s = mpl._val_or_rc(s, 'image.interpolation_stage') _api.check_in_list(['data', 'rgba', 'auto'], s=s) @@ -758,8 +758,7 @@ def set_resample(self, v): Parameters ---------- - v : bool or None - If None, use :rc:`image.resample`. + v : bool, default: :rc:`image.resample` """ v = mpl._val_or_rc(v, 'image.resample') self._resample = v @@ -788,8 +787,10 @@ def get_filternorm(self): def set_filterrad(self, filterrad): """ - Set the resize filter radius only applicable to some - interpolation schemes -- see help for imshow + Set the resize filter radius (only applicable to some + interpolation schemes). + + See help for `~.Axes.imshow`. Parameters ----------