@@ -4360,21 +4360,10 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4360
4360
See :mod:`matplotlib.markers` for more information about marker
4361
4361
styles.
4362
4362
4363
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
4364
- A `.Colormap` instance or registered colormap name. *cmap* is only
4365
- used if *c* is an array of floats.
4366
-
4367
- norm : `~matplotlib.colors.Normalize`, default: None
4368
- If *c* is an array of floats, *norm* is used to scale the color
4369
- data, *c*, in the range 0 to 1, in order to map into the colormap
4370
- *cmap*.
4371
- If *None*, use the default `.colors.Normalize`.
4372
-
4373
- vmin, vmax : float, default: None
4374
- *vmin* and *vmax* are used in conjunction with the default norm to
4375
- map the color array *c* to the colormap *cmap*. If None, the
4376
- respective min and max of the color array is used.
4377
- It is an error to use *vmin*/*vmax* when *norm* is given.
4363
+ cmap, norm, vmin, vmax
4364
+ Data normalization and colormapping parameters for *c*; only used
4365
+ if *c* is an array of floats. See `~.Axes.imshow` for a detailed
4366
+ description.
4378
4367
4379
4368
alpha : float, default: None
4380
4369
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4647,21 +4636,9 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4647
4636
4648
4637
Other Parameters
4649
4638
----------------
4650
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
4651
- The Colormap instance or registered colormap name used to map
4652
- the bin values to colors.
4653
-
4654
- norm : `~matplotlib.colors.Normalize`, optional
4655
- The Normalize instance scales the bin values to the canonical
4656
- colormap range [0, 1] for mapping to colors. By default, the data
4657
- range is mapped to the colorbar range using linear scaling.
4658
-
4659
- vmin, vmax : float, default: None
4660
- The colorbar range. If *None*, suitable min/max values are
4661
- automatically chosen by the `.Normalize` instance (defaults to
4662
- the respective min/max values of the bins in case of the default
4663
- linear scaling).
4664
- It is an error to use *vmin*/*vmax* when *norm* is given.
4639
+ cmap, norm, vmin, vmax
4640
+ Data normalization and colormapping parameters. See `~.Axes.imshow`
4641
+ for a detailed description.
4665
4642
4666
4643
alpha : float between 0 and 1, optional
4667
4644
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -5287,6 +5264,10 @@ def fill_betweenx(self, y, x1, x2=0, where=None,
5287
5264
replace_names = ["y" , "x1" , "x2" , "where" ])
5288
5265
5289
5266
#### plotting z(x, y): imshow, pcolor and relatives, contour
5267
+
5268
+ # Once this deprecation elapses, also move vmin, vmax right after norm, to
5269
+ # match the signature of other methods returning ScalarMappables and keep
5270
+ # the documentation for *norm*, *vmax* and *vmin* together.
5290
5271
@_api .make_keyword_only ("3.5" , "aspect" )
5291
5272
@_preprocess_data ()
5292
5273
def imshow (self , X , cmap = None , norm = None , aspect = None ,
@@ -5331,12 +5312,31 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5331
5312
The Colormap instance or registered colormap name used to map
5332
5313
scalar data to colors. This parameter is ignored for RGB(A) data.
5333
5314
5334
- norm : `~matplotlib.colors.Normalize`, optional
5335
- The `.Normalize` instance used to scale scalar data to the [0, 1]
5315
+ norm : str or `~matplotlib.colors.Normalize`, optional
5316
+ The normalization method used to scale scalar data to the [0, 1]
5336
5317
range before mapping to colors using *cmap*. By default, a linear
5337
5318
scaling mapping the lowest value to 0 and the highest to 1 is used.
5338
5319
This parameter is ignored for RGB(A) data.
5339
5320
5321
+ If given, this can be one of the following:
5322
+
5323
+ - An instance of `.Normalize` or one of its subclasses
5324
+ (see :doc:`/tutorials/colors/colormapnorms`).
5325
+ - A scale name, i.e. one of "linear", "log", "symlog", "logit",
5326
+ etc. For a full list of available scales call
5327
+ `matplotlib.scales.get_scale_names()`.
5328
+ In that case, a suitable `.Normalize` subclass is dynamically
5329
+ generated and instantiated.
5330
+
5331
+ vmin, vmax : float, optional
5332
+ When using scalar data and no explicit *norm*, *vmin* and *vmax*
5333
+ define the data range that the colormap covers. By default, the
5334
+ colormap covers the complete value range of the supplied data. It
5335
+ is an error to use *vmin*/*vmax* when a *norm* instance is given
5336
+ (but using a `str` *norm* name together with *vmin*/*vmax* is
5337
+ acceptable). When using RGB(A) data, parameters *vmin*/*vmax* are
5338
+ ignored.
5339
+
5340
5340
aspect : {'equal', 'auto'} or float, default: :rc:`image.aspect`
5341
5341
The aspect ratio of the Axes. This parameter is particularly
5342
5342
relevant for images since it determines whether data pixels are
@@ -5395,13 +5395,6 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5395
5395
If *alpha* is an array, the alpha blending values are applied pixel
5396
5396
by pixel, and *alpha* must have the same shape as *X*.
5397
5397
5398
- vmin, vmax : float, optional
5399
- When using scalar data and no explicit *norm*, *vmin* and *vmax*
5400
- define the data range that the colormap covers. By default,
5401
- the colormap covers the complete value range of the supplied
5402
- data. It is an error to use *vmin*/*vmax* when *norm* is given.
5403
- When using RGB(A) data, parameters *vmin*/*vmax* are ignored.
5404
-
5405
5398
origin : {'upper', 'lower'}, default: :rc:`image.origin`
5406
5399
Place the [0, 0] index of the array in the upper left or lower
5407
5400
left corner of the Axes. The convention (the default) 'upper' is
@@ -5711,21 +5704,9 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
5711
5704
See :doc:`/gallery/images_contours_and_fields/pcolormesh_grids`
5712
5705
for more description.
5713
5706
5714
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
5715
- A Colormap instance or registered colormap name. The colormap
5716
- maps the *C* values to colors.
5717
-
5718
- norm : `~matplotlib.colors.Normalize`, optional
5719
- The Normalize instance scales the data values to the canonical
5720
- colormap range [0, 1] for mapping to colors. By default, the data
5721
- range is mapped to the colorbar range using linear scaling.
5722
-
5723
- vmin, vmax : float, default: None
5724
- The colorbar range. If *None*, suitable min/max values are
5725
- automatically chosen by the `.Normalize` instance (defaults to
5726
- the respective min/max values of *C* in case of the default linear
5727
- scaling).
5728
- It is an error to use *vmin*/*vmax* when *norm* is given.
5707
+ cmap, norm, vmin, vmax
5708
+ Data normalization and colormapping parameters for *C*. See
5709
+ `~.Axes.imshow` for a detailed description.
5729
5710
5730
5711
edgecolors : {'none', None, 'face', color, color sequence}, optional
5731
5712
The color of the edges. Defaults to 'none'. Possible values:
@@ -5937,21 +5918,9 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5937
5918
expanded as needed into the appropriate 2D arrays, making a
5938
5919
rectangular grid.
5939
5920
5940
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
5941
- A Colormap instance or registered colormap name. The colormap
5942
- maps the *C* values to colors.
5943
-
5944
- norm : `~matplotlib.colors.Normalize`, optional
5945
- The Normalize instance scales the data values to the canonical
5946
- colormap range [0, 1] for mapping to colors. By default, the data
5947
- range is mapped to the colorbar range using linear scaling.
5948
-
5949
- vmin, vmax : float, default: None
5950
- The colorbar range. If *None*, suitable min/max values are
5951
- automatically chosen by the `.Normalize` instance (defaults to
5952
- the respective min/max values of *C* in case of the default linear
5953
- scaling).
5954
- It is an error to use *vmin*/*vmax* when *norm* is given.
5921
+ cmap, norm, vmin, vmax
5922
+ Data normalization and colormapping parameters for *C*. See
5923
+ `~.Axes.imshow` for a detailed description.
5955
5924
5956
5925
edgecolors : {'none', None, 'face', color, color sequence}, optional
5957
5926
The color of the edges. Defaults to 'none'. Possible values:
@@ -6185,21 +6154,9 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6185
6154
6186
6155
These arguments can only be passed positionally.
6187
6156
6188
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
6189
- A Colormap instance or registered colormap name. The colormap
6190
- maps the *C* values to colors.
6191
-
6192
- norm : `~matplotlib.colors.Normalize`, optional
6193
- The Normalize instance scales the data values to the canonical
6194
- colormap range [0, 1] for mapping to colors. By default, the data
6195
- range is mapped to the colorbar range using linear scaling.
6196
-
6197
- vmin, vmax : float, default: None
6198
- The colorbar range. If *None*, suitable min/max values are
6199
- automatically chosen by the `.Normalize` instance (defaults to
6200
- the respective min/max values of *C* in case of the default linear
6201
- scaling).
6202
- It is an error to use *vmin*/*vmax* when *norm* is given.
6157
+ cmap, norm, vmin, vmax
6158
+ Data normalization and colormapping parameters for *C*. See
6159
+ `~.Axes.imshow` for a detailed description.
6203
6160
6204
6161
alpha : float, default: None
6205
6162
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6954,16 +6911,9 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
6954
6911
6955
6912
Other Parameters
6956
6913
----------------
6957
- cmap : Colormap or str, optional
6958
- A `.colors.Colormap` instance. If not set, use rc settings.
6959
-
6960
- norm : Normalize, optional
6961
- A `.colors.Normalize` instance is used to
6962
- scale luminance data to ``[0, 1]``. If not set, defaults to
6963
- `.colors.Normalize()`.
6964
-
6965
- vmin/vmax : None or scalar, optional
6966
- Arguments passed to the `~.colors.Normalize` instance.
6914
+ cmap, norm, vmin, vmax
6915
+ Data normalization and colormapping parameters. See `~.Axes.imshow`
6916
+ for a detailed description.
6967
6917
6968
6918
alpha : ``0 <= scalar <= 1`` or ``None``, optional
6969
6919
The alpha blending value.
0 commit comments