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