@@ -4324,8 +4324,8 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4324
4324
vmin, vmax : scalar, default: None
4325
4325
*vmin* and *vmax* are used in conjunction with *norm* to normalize
4326
4326
luminance data. If None, the respective min and max of the color
4327
- array is used. *vmin* and *vmax* are ignored if you pass a *norm*
4328
- instance .
4327
+ array is used.
4328
+ It is deprecated to use *vmin*/*vmax* when *norm* is given .
4329
4329
4330
4330
alpha : scalar, default: None
4331
4331
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4450,11 +4450,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4450
4450
collection .set_array (c )
4451
4451
collection .set_cmap (cmap )
4452
4452
collection .set_norm (norm )
4453
-
4454
- if vmin is not None or vmax is not None :
4455
- collection .set_clim (vmin , vmax )
4456
- else :
4457
- collection .autoscale_None ()
4453
+ collection ._scale_norm (norm , vmin , vmax )
4458
4454
4459
4455
# Classic mode only:
4460
4456
# ensure there are margins to allow for the
@@ -4560,7 +4556,8 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4560
4556
The colorbar range. If *None*, suitable min/max values are
4561
4557
automatically chosen by the `~.Normalize` instance (defaults to
4562
4558
the respective min/max values of the bins in case of the default
4563
- linear scaling). This is ignored if *norm* is given.
4559
+ linear scaling).
4560
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
4564
4561
4565
4562
alpha : float between 0 and 1, optional
4566
4563
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4804,11 +4801,7 @@ def reduce_C_function(C: array) -> float
4804
4801
collection .set_norm (norm )
4805
4802
collection .set_alpha (alpha )
4806
4803
collection .update (kwargs )
4807
-
4808
- if vmin is not None or vmax is not None :
4809
- collection .set_clim (vmin , vmax )
4810
- else :
4811
- collection .autoscale_None ()
4804
+ collection ._scale_norm (norm , vmin , vmax )
4812
4805
4813
4806
corners = ((xmin , ymin ), (xmax , ymax ))
4814
4807
self .update_datalim (corners )
@@ -5530,7 +5523,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5530
5523
When using scalar data and no explicit *norm*, *vmin* and *vmax*
5531
5524
define the data range that the colormap covers. By default,
5532
5525
the colormap covers the complete value range of the supplied
5533
- data. *vmin*, *vmax* are ignored if the *norm* parameter is used .
5526
+ data. It is deprecated to use *vmin*/ *vmax* when *norm* is given .
5534
5527
5535
5528
origin : {'upper', 'lower'}, optional
5536
5529
Place the [0, 0] index of the array in the upper left or lower left
@@ -5627,10 +5620,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5627
5620
if im .get_clip_path () is None :
5628
5621
# image does not already have clipping set, clip to axes patch
5629
5622
im .set_clip_path (self .patch )
5630
- if vmin is not None or vmax is not None :
5631
- im .set_clim (vmin , vmax )
5632
- else :
5633
- im .autoscale_None ()
5623
+ im ._scale_norm (norm , vmin , vmax )
5634
5624
im .set_url (url )
5635
5625
5636
5626
# update ax.dataLim, and, if autoscaling, set viewLim
@@ -5769,6 +5759,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5769
5759
automatically chosen by the `~.Normalize` instance (defaults to
5770
5760
the respective min/max values of *C* in case of the default linear
5771
5761
scaling).
5762
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
5772
5763
5773
5764
edgecolors : {'none', None, 'face', color, color sequence}, optional
5774
5765
The color of the edges. Defaults to 'none'. Possible values:
@@ -5905,8 +5896,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5905
5896
collection .set_array (C )
5906
5897
collection .set_cmap (cmap )
5907
5898
collection .set_norm (norm )
5908
- collection .set_clim (vmin , vmax )
5909
- collection .autoscale_None ()
5899
+ collection ._scale_norm (norm , vmin , vmax )
5910
5900
self .grid (False )
5911
5901
5912
5902
x = X .compressed ()
@@ -6000,6 +5990,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6000
5990
automatically chosen by the `~.Normalize` instance (defaults to
6001
5991
the respective min/max values of *C* in case of the default linear
6002
5992
scaling).
5993
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
6003
5994
6004
5995
edgecolors : {'none', None, 'face', color, color sequence}, optional
6005
5996
The color of the edges. Defaults to 'none'. Possible values:
@@ -6119,8 +6110,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6119
6110
collection .set_array (C )
6120
6111
collection .set_cmap (cmap )
6121
6112
collection .set_norm (norm )
6122
- collection .set_clim (vmin , vmax )
6123
- collection .autoscale_None ()
6113
+ collection ._scale_norm (norm , vmin , vmax )
6124
6114
6125
6115
self .grid (False )
6126
6116
@@ -6234,6 +6224,7 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6234
6224
automatically chosen by the `~.Normalize` instance (defaults to
6235
6225
the respective min/max values of *C* in case of the default linear
6236
6226
scaling).
6227
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
6237
6228
6238
6229
alpha : scalar, default: None
6239
6230
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6316,10 +6307,9 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6316
6307
self .add_image (im )
6317
6308
ret = im
6318
6309
6319
- if vmin is not None or vmax is not None :
6320
- ret .set_clim (vmin , vmax )
6321
- elif np .ndim (C ) == 2 : # C.ndim == 3 is RGB(A) so doesn't need scaling.
6322
- ret .autoscale_None ()
6310
+ if np .ndim (C ) == 2 : # C.ndim == 3 is RGB(A) so doesn't need scaling.
6311
+ ret ._scale_norm (norm , vmin , vmax )
6312
+
6323
6313
if ret .get_clip_path () is None :
6324
6314
# image does not already have clipping set, clip to axes patch
6325
6315
ret .set_clip_path (self .patch )
0 commit comments