@@ -4369,21 +4369,10 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4369
4369
See :mod:`matplotlib.markers` for more information about marker
4370
4370
styles.
4371
4371
4372
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
4373
- A `.Colormap` instance or registered colormap name. *cmap* is only
4374
- used if *c* is an array of floats.
4375
-
4376
- norm : `~matplotlib.colors.Normalize`, default: None
4377
- If *c* is an array of floats, *norm* is used to scale the color
4378
- data, *c*, in the range 0 to 1, in order to map into the colormap
4379
- *cmap*.
4380
- If *None*, use the default `.colors.Normalize`.
4381
-
4382
- vmin, vmax : float, default: None
4383
- *vmin* and *vmax* are used in conjunction with the default norm to
4384
- map the color array *c* to the colormap *cmap*. If None, the
4385
- respective min and max of the color array is used.
4386
- It is an error to use *vmin*/*vmax* when *norm* is given.
4372
+ cmap, norm, vmin, vmax
4373
+ Data normalization and colormapping parameters for *c*; only used
4374
+ if *c* is an array of floats. See `~.Axes.imshow` for a detailed
4375
+ description.
4387
4376
4388
4377
alpha : float, default: None
4389
4378
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4656,21 +4645,9 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4656
4645
4657
4646
Other Parameters
4658
4647
----------------
4659
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
4660
- The Colormap instance or registered colormap name used to map
4661
- the bin values to colors.
4662
-
4663
- norm : `~matplotlib.colors.Normalize`, optional
4664
- The Normalize instance scales the bin values to the canonical
4665
- colormap range [0, 1] for mapping to colors. By default, the data
4666
- range is mapped to the colorbar range using linear scaling.
4667
-
4668
- vmin, vmax : float, default: None
4669
- The colorbar range. If *None*, suitable min/max values are
4670
- automatically chosen by the `.Normalize` instance (defaults to
4671
- the respective min/max values of the bins in case of the default
4672
- linear scaling).
4673
- It is an error to use *vmin*/*vmax* when *norm* is given.
4648
+ cmap, norm, vmin, vmax
4649
+ Data normalization and colormapping parameters. See `~.Axes.imshow`
4650
+ for a detailed description.
4674
4651
4675
4652
alpha : float between 0 and 1, optional
4676
4653
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -5296,6 +5273,10 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
5296
5273
replace_names = ["y" , "x1" , "x2" , "where" ])
5297
5274
5298
5275
#### plotting z(x, y): imshow, pcolor and relatives, contour
5276
+
5277
+ # Once this deprecation elapses, also move vmin, vmax right after norm, to
5278
+ # match the signature of other methods returning ScalarMappables and keep
5279
+ # the documentation for *norm*, *vmax* and *vmin* together.
5299
5280
@_api .make_keyword_only ("3.5" , "aspect" )
5300
5281
@_preprocess_data ()
5301
5282
def imshow (self , X , cmap = None , norm = None , aspect = None ,
@@ -5340,12 +5321,31 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5340
5321
The Colormap instance or registered colormap name used to map
5341
5322
scalar data to colors. This parameter is ignored for RGB(A) data.
5342
5323
5343
- norm : `~matplotlib.colors.Normalize`, optional
5344
- The `.Normalize` instance used to scale scalar data to the [0, 1]
5324
+ norm : str or `~matplotlib.colors.Normalize`, optional
5325
+ The normalization method used to scale scalar data to the [0, 1]
5345
5326
range before mapping to colors using *cmap*. By default, a linear
5346
5327
scaling mapping the lowest value to 0 and the highest to 1 is used.
5347
5328
This parameter is ignored for RGB(A) data.
5348
5329
5330
+ If given, this can be one of the following:
5331
+
5332
+ - An instance of `.Normalize` or one of its subclasses
5333
+ (see :doc:`/tutorials/colors/colormapnorms`).
5334
+ - A scale name, i.e. one of "linear", "log", "symlog", "logit",
5335
+ etc. For a full list of available scales call
5336
+ `matplotlib.scales.get_scale_names()`.
5337
+ In that case, a suitable `.Normalize` subclass is dynamically
5338
+ generated and instantiated.
5339
+
5340
+ vmin, vmax : float, optional
5341
+ When using scalar data and no explicit *norm*, *vmin* and *vmax*
5342
+ define the data range that the colormap covers. By default, the
5343
+ colormap covers the complete value range of the supplied data. It
5344
+ is an error to use *vmin*/*vmax* when a *norm* instance is given
5345
+ (but using a `str` *norm* name together with *vmin*/*vmax* is
5346
+ acceptable). When using RGB(A) data, parameters *vmin*/*vmax* are
5347
+ ignored.
5348
+
5349
5349
aspect : {'equal', 'auto'} or float, default: :rc:`image.aspect`
5350
5350
The aspect ratio of the Axes. This parameter is particularly
5351
5351
relevant for images since it determines whether data pixels are
@@ -5404,13 +5404,6 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5404
5404
If *alpha* is an array, the alpha blending values are applied pixel
5405
5405
by pixel, and *alpha* must have the same shape as *X*.
5406
5406
5407
- vmin, vmax : float, optional
5408
- When using scalar data and no explicit *norm*, *vmin* and *vmax*
5409
- define the data range that the colormap covers. By default,
5410
- the colormap covers the complete value range of the supplied
5411
- data. It is an error to use *vmin*/*vmax* when *norm* is given.
5412
- When using RGB(A) data, parameters *vmin*/*vmax* are ignored.
5413
-
5414
5407
origin : {'upper', 'lower'}, default: :rc:`image.origin`
5415
5408
Place the [0, 0] index of the array in the upper left or lower
5416
5409
left corner of the Axes. The convention (the default) 'upper' is
@@ -5721,21 +5714,9 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
5721
5714
See :doc:`/gallery/images_contours_and_fields/pcolormesh_grids`
5722
5715
for more description.
5723
5716
5724
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
5725
- A Colormap instance or registered colormap name. The colormap
5726
- maps the *C* values to colors.
5727
-
5728
- norm : `~matplotlib.colors.Normalize`, optional
5729
- The Normalize instance scales the data values to the canonical
5730
- colormap range [0, 1] for mapping to colors. By default, the data
5731
- range is mapped to the colorbar range using linear scaling.
5732
-
5733
- vmin, vmax : float, default: None
5734
- The colorbar range. If *None*, suitable min/max values are
5735
- automatically chosen by the `.Normalize` instance (defaults to
5736
- the respective min/max values of *C* in case of the default linear
5737
- scaling).
5738
- It is an error to use *vmin*/*vmax* when *norm* is given.
5717
+ cmap, norm, vmin, vmax
5718
+ Data normalization and colormapping parameters for *C*. See
5719
+ `~.Axes.imshow` for a detailed description.
5739
5720
5740
5721
edgecolors : {'none', None, 'face', color, color sequence}, optional
5741
5722
The color of the edges. Defaults to 'none'. Possible values:
@@ -5947,21 +5928,9 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5947
5928
expanded as needed into the appropriate 2D arrays, making a
5948
5929
rectangular grid.
5949
5930
5950
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
5951
- A Colormap instance or registered colormap name. The colormap
5952
- maps the *C* values to colors.
5953
-
5954
- norm : `~matplotlib.colors.Normalize`, optional
5955
- The Normalize instance scales the data values to the canonical
5956
- colormap range [0, 1] for mapping to colors. By default, the data
5957
- range is mapped to the colorbar range using linear scaling.
5958
-
5959
- vmin, vmax : float, default: None
5960
- The colorbar range. If *None*, suitable min/max values are
5961
- automatically chosen by the `.Normalize` instance (defaults to
5962
- the respective min/max values of *C* in case of the default linear
5963
- scaling).
5964
- It is an error to use *vmin*/*vmax* when *norm* is given.
5931
+ cmap, norm, vmin, vmax
5932
+ Data normalization and colormapping parameters for *C*. See
5933
+ `~.Axes.imshow` for a detailed description.
5965
5934
5966
5935
edgecolors : {'none', None, 'face', color, color sequence}, optional
5967
5936
The color of the edges. Defaults to 'none'. Possible values:
@@ -6195,21 +6164,9 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6195
6164
6196
6165
These arguments can only be passed positionally.
6197
6166
6198
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
6199
- A Colormap instance or registered colormap name. The colormap
6200
- maps the *C* values to colors.
6201
-
6202
- norm : `~matplotlib.colors.Normalize`, optional
6203
- The Normalize instance scales the data values to the canonical
6204
- colormap range [0, 1] for mapping to colors. By default, the data
6205
- range is mapped to the colorbar range using linear scaling.
6206
-
6207
- vmin, vmax : float, default: None
6208
- The colorbar range. If *None*, suitable min/max values are
6209
- automatically chosen by the `.Normalize` instance (defaults to
6210
- the respective min/max values of *C* in case of the default linear
6211
- scaling).
6212
- It is an error to use *vmin*/*vmax* when *norm* is given.
6167
+ cmap, norm, vmin, vmax
6168
+ Data normalization and colormapping parameters for *C*. See
6169
+ `~.Axes.imshow` for a detailed description.
6213
6170
6214
6171
alpha : float, default: None
6215
6172
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6964,16 +6921,9 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
6964
6921
6965
6922
Other Parameters
6966
6923
----------------
6967
- cmap : Colormap or str, optional
6968
- A `.colors.Colormap` instance. If not set, use rc settings.
6969
-
6970
- norm : Normalize, optional
6971
- A `.colors.Normalize` instance is used to
6972
- scale luminance data to ``[0, 1]``. If not set, defaults to
6973
- `.colors.Normalize()`.
6974
-
6975
- vmin/vmax : None or scalar, optional
6976
- Arguments passed to the `~.colors.Normalize` instance.
6924
+ cmap, norm, vmin, vmax
6925
+ Data normalization and colormapping parameters. See `~.Axes.imshow`
6926
+ for a detailed description.
6977
6927
6978
6928
alpha : ``0 <= scalar <= 1`` or ``None``, optional
6979
6929
The alpha blending value.
0 commit comments