@@ -4293,8 +4293,8 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4293
4293
vmin, vmax : scalar, default: None
4294
4294
*vmin* and *vmax* are used in conjunction with *norm* to normalize
4295
4295
luminance data. If None, the respective min and max of the color
4296
- array is used. *vmin* and *vmax* are ignored if you pass a *norm*
4297
- instance .
4296
+ array is used.
4297
+ It is deprecated to use *vmin*/*vmax* when *norm* is given .
4298
4298
4299
4299
alpha : scalar, default: None
4300
4300
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4415,11 +4415,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4415
4415
collection .set_array (c )
4416
4416
collection .set_cmap (cmap )
4417
4417
collection .set_norm (norm )
4418
-
4419
- if vmin is not None or vmax is not None :
4420
- collection .set_clim (vmin , vmax )
4421
- else :
4422
- collection .autoscale_None ()
4418
+ collection ._scale_norm (norm , vmin , vmax )
4423
4419
4424
4420
# Classic mode only:
4425
4421
# ensure there are margins to allow for the
@@ -4525,7 +4521,8 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4525
4521
The colorbar range. If *None*, suitable min/max values are
4526
4522
automatically chosen by the `~.Normalize` instance (defaults to
4527
4523
the respective min/max values of the bins in case of the default
4528
- linear scaling). This is ignored if *norm* is given.
4524
+ linear scaling).
4525
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
4529
4526
4530
4527
alpha : float between 0 and 1, optional
4531
4528
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4769,11 +4766,7 @@ def reduce_C_function(C: array) -> float
4769
4766
collection .set_norm (norm )
4770
4767
collection .set_alpha (alpha )
4771
4768
collection .update (kwargs )
4772
-
4773
- if vmin is not None or vmax is not None :
4774
- collection .set_clim (vmin , vmax )
4775
- else :
4776
- collection .autoscale_None ()
4769
+ collection ._scale_norm (norm , vmin , vmax )
4777
4770
4778
4771
corners = ((xmin , ymin ), (xmax , ymax ))
4779
4772
self .update_datalim (corners )
@@ -5489,7 +5482,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5489
5482
When using scalar data and no explicit *norm*, *vmin* and *vmax*
5490
5483
define the data range that the colormap covers. By default,
5491
5484
the colormap covers the complete value range of the supplied
5492
- data. *vmin*, *vmax* are ignored if the *norm* parameter is used .
5485
+ data. It is deprecated to use *vmin*/ *vmax* when *norm* is given .
5493
5486
5494
5487
origin : {'upper', 'lower'}, default: :rc:`image.origin`
5495
5488
Place the [0, 0] index of the array in the upper left or lower
@@ -5585,10 +5578,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5585
5578
if im .get_clip_path () is None :
5586
5579
# image does not already have clipping set, clip to axes patch
5587
5580
im .set_clip_path (self .patch )
5588
- if vmin is not None or vmax is not None :
5589
- im .set_clim (vmin , vmax )
5590
- else :
5591
- im .autoscale_None ()
5581
+ im ._scale_norm (norm , vmin , vmax )
5592
5582
im .set_url (url )
5593
5583
5594
5584
# update ax.dataLim, and, if autoscaling, set viewLim
@@ -5727,6 +5717,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5727
5717
automatically chosen by the `~.Normalize` instance (defaults to
5728
5718
the respective min/max values of *C* in case of the default linear
5729
5719
scaling).
5720
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
5730
5721
5731
5722
edgecolors : {'none', None, 'face', color, color sequence}, optional
5732
5723
The color of the edges. Defaults to 'none'. Possible values:
@@ -5863,8 +5854,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5863
5854
collection .set_array (C )
5864
5855
collection .set_cmap (cmap )
5865
5856
collection .set_norm (norm )
5866
- collection .set_clim (vmin , vmax )
5867
- collection .autoscale_None ()
5857
+ collection ._scale_norm (norm , vmin , vmax )
5868
5858
self .grid (False )
5869
5859
5870
5860
x = X .compressed ()
@@ -5958,6 +5948,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5958
5948
automatically chosen by the `~.Normalize` instance (defaults to
5959
5949
the respective min/max values of *C* in case of the default linear
5960
5950
scaling).
5951
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
5961
5952
5962
5953
edgecolors : {'none', None, 'face', color, color sequence}, optional
5963
5954
The color of the edges. Defaults to 'none'. Possible values:
@@ -6077,8 +6068,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6077
6068
collection .set_array (C )
6078
6069
collection .set_cmap (cmap )
6079
6070
collection .set_norm (norm )
6080
- collection .set_clim (vmin , vmax )
6081
- collection .autoscale_None ()
6071
+ collection ._scale_norm (norm , vmin , vmax )
6082
6072
6083
6073
self .grid (False )
6084
6074
@@ -6192,6 +6182,7 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6192
6182
automatically chosen by the `~.Normalize` instance (defaults to
6193
6183
the respective min/max values of *C* in case of the default linear
6194
6184
scaling).
6185
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
6195
6186
6196
6187
alpha : scalar, default: None
6197
6188
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6274,10 +6265,9 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6274
6265
self .add_image (im )
6275
6266
ret = im
6276
6267
6277
- if vmin is not None or vmax is not None :
6278
- ret .set_clim (vmin , vmax )
6279
- elif np .ndim (C ) == 2 : # C.ndim == 3 is RGB(A) so doesn't need scaling.
6280
- ret .autoscale_None ()
6268
+ if np .ndim (C ) == 2 : # C.ndim == 3 is RGB(A) so doesn't need scaling.
6269
+ ret ._scale_norm (norm , vmin , vmax )
6270
+
6281
6271
if ret .get_clip_path () is None :
6282
6272
# image does not already have clipping set, clip to axes patch
6283
6273
ret .set_clip_path (self .patch )
0 commit comments