@@ -4296,21 +4296,10 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4296
4296
See :mod:`matplotlib.markers` for more information about marker
4297
4297
styles.
4298
4298
4299
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
4300
- A `.Colormap` instance or registered colormap name. *cmap* is only
4301
- used if *c* is an array of floats.
4302
-
4303
- norm : `~matplotlib.colors.Normalize`, default: None
4304
- If *c* is an array of floats, *norm* is used to scale the color
4305
- data, *c*, in the range 0 to 1, in order to map into the colormap
4306
- *cmap*.
4307
- If *None*, use the default `.colors.Normalize`.
4308
-
4309
- vmin, vmax : float, default: None
4310
- *vmin* and *vmax* are used in conjunction with the default norm to
4311
- map the color array *c* to the colormap *cmap*. If None, the
4312
- respective min and max of the color array is used.
4313
- It is an error to use *vmin*/*vmax* when *norm* is given.
4299
+ cmap, norm, vmin, vmax
4300
+ The data normalization and colormapping, which are explained in
4301
+ detail in the documentation for `~matplotlib.axes.Axes.imshow`.
4302
+ They are only used if *c* in an array of floats.
4314
4303
4315
4304
alpha : float, default: None
4316
4305
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4583,14 +4572,9 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4583
4572
4584
4573
Other Parameters
4585
4574
----------------
4586
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
4587
- The Colormap instance or registered colormap name used to map
4588
- the bin values to colors.
4589
-
4590
- norm : `~matplotlib.colors.Normalize`, optional
4591
- The Normalize instance scales the bin values to the canonical
4592
- colormap range [0, 1] for mapping to colors. By default, the data
4593
- range is mapped to the colorbar range using linear scaling.
4575
+ cmap, norm, vmin, vmax
4576
+ The data normalization and colormapping, which are explained in
4577
+ detail in the documentation for `~matplotlib.axes.Axes.imshow`.
4594
4578
4595
4579
vmin, vmax : float, default: None
4596
4580
The colorbar range. If *None*, suitable min/max values are
@@ -5326,12 +5310,17 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5326
5310
The Colormap instance or registered colormap name used to map
5327
5311
scalar data to colors. This parameter is ignored for RGB(A) data.
5328
5312
5329
- norm : `~matplotlib.colors.Normalize`, optional
5313
+ norm : str or `~matplotlib.colors.Normalize`, optional
5330
5314
The `.Normalize` instance used to scale scalar data to the [0, 1]
5331
- range before mapping to colors using *cmap*. By default, a linear
5315
+ range before mapping to colors using *cmap*. By default, a linear
5332
5316
scaling mapping the lowest value to 0 and the highest to 1 is used.
5333
5317
This parameter is ignored for RGB(A) data.
5334
5318
5319
+ The normalization can also be given as a str, which should be a
5320
+ scale name. In that case, a normalization class is dynamically
5321
+ generated from the corresponding scale, as if using that scale for
5322
+ the image's colorbar.
5323
+
5335
5324
aspect : {'equal', 'auto'} or float, default: :rc:`image.aspect`
5336
5325
The aspect ratio of the Axes. This parameter is particularly
5337
5326
relevant for images since it determines whether data pixels are
@@ -5392,10 +5381,12 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5392
5381
5393
5382
vmin, vmax : float, optional
5394
5383
When using scalar data and no explicit *norm*, *vmin* and *vmax*
5395
- define the data range that the colormap covers. By default,
5396
- the colormap covers the complete value range of the supplied
5397
- data. It is an error to use *vmin*/*vmax* when *norm* is given.
5398
- When using RGB(A) data, parameters *vmin*/*vmax* are ignored.
5384
+ define the data range that the colormap covers. By default, the
5385
+ colormap covers the complete value range of the supplied data. It
5386
+ is an error to use *vmin*/*vmax* when a *norm* instance is given
5387
+ (but using a `str` *norm* name together with *vmin*/*vmax* is
5388
+ acceptable). When using RGB(A) data, parameters *vmin*/*vmax* are
5389
+ ignored.
5399
5390
5400
5391
origin : {'upper', 'lower'}, default: :rc:`image.origin`
5401
5392
Place the [0, 0] index of the array in the upper left or lower
@@ -5703,21 +5694,9 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
5703
5694
See :doc:`/gallery/images_contours_and_fields/pcolormesh_grids`
5704
5695
for more description.
5705
5696
5706
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
5707
- A Colormap instance or registered colormap name. The colormap
5708
- maps the *C* values to colors.
5709
-
5710
- norm : `~matplotlib.colors.Normalize`, optional
5711
- The Normalize instance scales the data values to the canonical
5712
- colormap range [0, 1] for mapping to colors. By default, the data
5713
- range is mapped to the colorbar range using linear scaling.
5714
-
5715
- vmin, vmax : float, default: None
5716
- The colorbar range. If *None*, suitable min/max values are
5717
- automatically chosen by the `.Normalize` instance (defaults to
5718
- the respective min/max values of *C* in case of the default linear
5719
- scaling).
5720
- It is an error to use *vmin*/*vmax* when *norm* is given.
5697
+ cmap, norm, vmin, vmax
5698
+ The data normalization and colormapping, which are explained in
5699
+ detail in the documentation for `~matplotlib.axes.Axes.imshow`.
5721
5700
5722
5701
edgecolors : {'none', None, 'face', color, color sequence}, optional
5723
5702
The color of the edges. Defaults to 'none'. Possible values:
@@ -5929,21 +5908,9 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5929
5908
expanded as needed into the appropriate 2D arrays, making a
5930
5909
rectangular grid.
5931
5910
5932
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
5933
- A Colormap instance or registered colormap name. The colormap
5934
- maps the *C* values to colors.
5935
-
5936
- norm : `~matplotlib.colors.Normalize`, optional
5937
- The Normalize instance scales the data values to the canonical
5938
- colormap range [0, 1] for mapping to colors. By default, the data
5939
- range is mapped to the colorbar range using linear scaling.
5940
-
5941
- vmin, vmax : float, default: None
5942
- The colorbar range. If *None*, suitable min/max values are
5943
- automatically chosen by the `.Normalize` instance (defaults to
5944
- the respective min/max values of *C* in case of the default linear
5945
- scaling).
5946
- It is an error to use *vmin*/*vmax* when *norm* is given.
5911
+ cmap, norm, vmin, vmax
5912
+ The data normalization and colormapping, which are explained in
5913
+ detail in the documentation for `~matplotlib.axes.Axes.imshow`.
5947
5914
5948
5915
edgecolors : {'none', None, 'face', color, color sequence}, optional
5949
5916
The color of the edges. Defaults to 'none'. Possible values:
@@ -6177,21 +6144,9 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6177
6144
6178
6145
These arguments can only be passed positionally.
6179
6146
6180
- cmap : str or `~matplotlib.colors.Colormap`, default: :rc:`image.cmap`
6181
- A Colormap instance or registered colormap name. The colormap
6182
- maps the *C* values to colors.
6183
-
6184
- norm : `~matplotlib.colors.Normalize`, optional
6185
- The Normalize instance scales the data values to the canonical
6186
- colormap range [0, 1] for mapping to colors. By default, the data
6187
- range is mapped to the colorbar range using linear scaling.
6188
-
6189
- vmin, vmax : float, default: None
6190
- The colorbar range. If *None*, suitable min/max values are
6191
- automatically chosen by the `.Normalize` instance (defaults to
6192
- the respective min/max values of *C* in case of the default linear
6193
- scaling).
6194
- It is an error to use *vmin*/*vmax* when *norm* is given.
6147
+ cmap, norm, vmin, vmax
6148
+ The data normalization and colormapping, which are explained in
6149
+ detail in the documentation for `~matplotlib.axes.Axes.imshow`.
6195
6150
6196
6151
alpha : float, default: None
6197
6152
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6945,16 +6900,9 @@ def hist2d(self, x, y, bins=10, range=None, density=False, weights=None,
6945
6900
6946
6901
Other Parameters
6947
6902
----------------
6948
- cmap : Colormap or str, optional
6949
- A `.colors.Colormap` instance. If not set, use rc settings.
6950
-
6951
- norm : Normalize, optional
6952
- A `.colors.Normalize` instance is used to
6953
- scale luminance data to ``[0, 1]``. If not set, defaults to
6954
- `.colors.Normalize()`.
6955
-
6956
- vmin/vmax : None or scalar, optional
6957
- Arguments passed to the `~.colors.Normalize` instance.
6903
+ cmap, norm, vmin, vmax
6904
+ The data normalization and colormapping, which are explained in
6905
+ detail in the documentation for `~matplotlib.axes.Axes.imshow`.
6958
6906
6959
6907
alpha : ``0 <= scalar <= 1`` or ``None``, optional
6960
6908
The alpha blending value.
0 commit comments