@@ -4344,8 +4344,8 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4344
4344
vmin, vmax : scalar, optional, default: None
4345
4345
*vmin* and *vmax* are used in conjunction with *norm* to normalize
4346
4346
luminance data. If None, the respective min and max of the color
4347
- array is used. *vmin* and *vmax* are ignored if you pass a *norm*
4348
- instance .
4347
+ array is used.
4348
+ It is deprecated to use *vmin*/*vmax* when *norm* is given .
4349
4349
4350
4350
alpha : scalar, optional, default: None
4351
4351
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4470,11 +4470,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4470
4470
collection .set_array (c )
4471
4471
collection .set_cmap (cmap )
4472
4472
collection .set_norm (norm )
4473
-
4474
- if vmin is not None or vmax is not None :
4475
- collection .set_clim (vmin , vmax )
4476
- else :
4477
- collection .autoscale_None ()
4473
+ collection ._scale_norm (norm , vmin , vmax )
4478
4474
4479
4475
# Classic mode only:
4480
4476
# ensure there are margins to allow for the
@@ -4580,7 +4576,8 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4580
4576
The colorbar range. If *None*, suitable min/max values are
4581
4577
automatically chosen by the `~.Normalize` instance (defaults to
4582
4578
the respective min/max values of the bins in case of the default
4583
- linear scaling). This is ignored if *norm* is given.
4579
+ linear scaling).
4580
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
4584
4581
4585
4582
alpha : float between 0 and 1, optional
4586
4583
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4824,11 +4821,7 @@ def reduce_C_function(C: array) -> float
4824
4821
collection .set_norm (norm )
4825
4822
collection .set_alpha (alpha )
4826
4823
collection .update (kwargs )
4827
-
4828
- if vmin is not None or vmax is not None :
4829
- collection .set_clim (vmin , vmax )
4830
- else :
4831
- collection .autoscale_None ()
4824
+ collection ._scale_norm (norm , vmin , vmax )
4832
4825
4833
4826
corners = ((xmin , ymin ), (xmax , ymax ))
4834
4827
self .update_datalim (corners )
@@ -5555,7 +5548,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5555
5548
When using scalar data and no explicit *norm*, *vmin* and *vmax*
5556
5549
define the data range that the colormap covers. By default,
5557
5550
the colormap covers the complete value range of the supplied
5558
- data. *vmin*, *vmax* are ignored if the *norm* parameter is used .
5551
+ data. It is deprecated to use *vmin*/ *vmax* when *norm* is given .
5559
5552
5560
5553
origin : {'upper', 'lower'}, optional
5561
5554
Place the [0, 0] index of the array in the upper left or lower left
@@ -5652,10 +5645,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5652
5645
if im .get_clip_path () is None :
5653
5646
# image does not already have clipping set, clip to axes patch
5654
5647
im .set_clip_path (self .patch )
5655
- if vmin is not None or vmax is not None :
5656
- im .set_clim (vmin , vmax )
5657
- else :
5658
- im .autoscale_None ()
5648
+ im ._scale_norm (norm , vmin , vmax )
5659
5649
im .set_url (url )
5660
5650
5661
5651
# update ax.dataLim, and, if autoscaling, set viewLim
@@ -5794,6 +5784,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5794
5784
automatically chosen by the `~.Normalize` instance (defaults to
5795
5785
the respective min/max values of *C* in case of the default linear
5796
5786
scaling).
5787
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
5797
5788
5798
5789
edgecolors : {'none', None, 'face', color, color sequence}, optional
5799
5790
The color of the edges. Defaults to 'none'. Possible values:
@@ -5930,8 +5921,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5930
5921
collection .set_array (C )
5931
5922
collection .set_cmap (cmap )
5932
5923
collection .set_norm (norm )
5933
- collection .set_clim (vmin , vmax )
5934
- collection .autoscale_None ()
5924
+ collection ._scale_norm (norm , vmin , vmax )
5935
5925
self .grid (False )
5936
5926
5937
5927
x = X .compressed ()
@@ -6025,6 +6015,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6025
6015
automatically chosen by the `~.Normalize` instance (defaults to
6026
6016
the respective min/max values of *C* in case of the default linear
6027
6017
scaling).
6018
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
6028
6019
6029
6020
edgecolors : {'none', None, 'face', color, color sequence}, optional
6030
6021
The color of the edges. Defaults to 'none'. Possible values:
@@ -6144,8 +6135,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6144
6135
collection .set_array (C )
6145
6136
collection .set_cmap (cmap )
6146
6137
collection .set_norm (norm )
6147
- collection .set_clim (vmin , vmax )
6148
- collection .autoscale_None ()
6138
+ collection ._scale_norm (norm , vmin , vmax )
6149
6139
6150
6140
self .grid (False )
6151
6141
@@ -6259,6 +6249,7 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6259
6249
automatically chosen by the `~.Normalize` instance (defaults to
6260
6250
the respective min/max values of *C* in case of the default linear
6261
6251
scaling).
6252
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
6262
6253
6263
6254
alpha : scalar, optional, default: None
6264
6255
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6341,10 +6332,9 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6341
6332
self .add_image (im )
6342
6333
ret = im
6343
6334
6344
- if vmin is not None or vmax is not None :
6345
- ret .set_clim (vmin , vmax )
6346
- elif np .ndim (C ) == 2 : # C.ndim == 3 is RGB(A) so doesn't need scaling.
6347
- ret .autoscale_None ()
6335
+ if np .ndim (C ) == 2 : # C.ndim == 3 is RGB(A) so doesn't need scaling.
6336
+ ret ._scale_norm (norm , vmin , vmax )
6337
+
6348
6338
if ret .get_clip_path () is None :
6349
6339
# image does not already have clipping set, clip to axes patch
6350
6340
ret .set_clip_path (self .patch )
0 commit comments