@@ -4297,8 +4297,8 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4297
4297
vmin, vmax : scalar, default: None
4298
4298
*vmin* and *vmax* are used in conjunction with *norm* to normalize
4299
4299
luminance data. If None, the respective min and max of the color
4300
- array is used. *vmin* and *vmax* are ignored if you pass a *norm*
4301
- instance .
4300
+ array is used.
4301
+ It is deprecated to use *vmin*/*vmax* when *norm* is given .
4302
4302
4303
4303
alpha : scalar, default: None
4304
4304
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4419,11 +4419,7 @@ def scatter(self, x, y, s=None, c=None, marker=None, cmap=None, norm=None,
4419
4419
collection .set_array (c )
4420
4420
collection .set_cmap (cmap )
4421
4421
collection .set_norm (norm )
4422
-
4423
- if vmin is not None or vmax is not None :
4424
- collection .set_clim (vmin , vmax )
4425
- else :
4426
- collection .autoscale_None ()
4422
+ collection ._scale_norm (norm , vmin , vmax )
4427
4423
4428
4424
# Classic mode only:
4429
4425
# ensure there are margins to allow for the
@@ -4529,7 +4525,8 @@ def hexbin(self, x, y, C=None, gridsize=100, bins=None,
4529
4525
The colorbar range. If *None*, suitable min/max values are
4530
4526
automatically chosen by the `~.Normalize` instance (defaults to
4531
4527
the respective min/max values of the bins in case of the default
4532
- linear scaling). This is ignored if *norm* is given.
4528
+ linear scaling).
4529
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
4533
4530
4534
4531
alpha : float between 0 and 1, optional
4535
4532
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -4773,11 +4770,7 @@ def reduce_C_function(C: array) -> float
4773
4770
collection .set_norm (norm )
4774
4771
collection .set_alpha (alpha )
4775
4772
collection .update (kwargs )
4776
-
4777
- if vmin is not None or vmax is not None :
4778
- collection .set_clim (vmin , vmax )
4779
- else :
4780
- collection .autoscale_None ()
4773
+ collection ._scale_norm (norm , vmin , vmax )
4781
4774
4782
4775
corners = ((xmin , ymin ), (xmax , ymax ))
4783
4776
self .update_datalim (corners )
@@ -5493,7 +5486,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5493
5486
When using scalar data and no explicit *norm*, *vmin* and *vmax*
5494
5487
define the data range that the colormap covers. By default,
5495
5488
the colormap covers the complete value range of the supplied
5496
- data. *vmin*, *vmax* are ignored if the *norm* parameter is used .
5489
+ data. It is deprecated to use *vmin*/ *vmax* when *norm* is given .
5497
5490
5498
5491
origin : {'upper', 'lower'}, default: :rc:`image.origin`
5499
5492
Place the [0, 0] index of the array in the upper left or lower
@@ -5589,10 +5582,7 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
5589
5582
if im .get_clip_path () is None :
5590
5583
# image does not already have clipping set, clip to axes patch
5591
5584
im .set_clip_path (self .patch )
5592
- if vmin is not None or vmax is not None :
5593
- im .set_clim (vmin , vmax )
5594
- else :
5595
- im .autoscale_None ()
5585
+ im ._scale_norm (norm , vmin , vmax )
5596
5586
im .set_url (url )
5597
5587
5598
5588
# update ax.dataLim, and, if autoscaling, set viewLim
@@ -5731,6 +5721,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5731
5721
automatically chosen by the `~.Normalize` instance (defaults to
5732
5722
the respective min/max values of *C* in case of the default linear
5733
5723
scaling).
5724
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
5734
5725
5735
5726
edgecolors : {'none', None, 'face', color, color sequence}, optional
5736
5727
The color of the edges. Defaults to 'none'. Possible values:
@@ -5867,8 +5858,7 @@ def pcolor(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5867
5858
collection .set_array (C )
5868
5859
collection .set_cmap (cmap )
5869
5860
collection .set_norm (norm )
5870
- collection .set_clim (vmin , vmax )
5871
- collection .autoscale_None ()
5861
+ collection ._scale_norm (norm , vmin , vmax )
5872
5862
self .grid (False )
5873
5863
5874
5864
x = X .compressed ()
@@ -5962,6 +5952,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
5962
5952
automatically chosen by the `~.Normalize` instance (defaults to
5963
5953
the respective min/max values of *C* in case of the default linear
5964
5954
scaling).
5955
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
5965
5956
5966
5957
edgecolors : {'none', None, 'face', color, color sequence}, optional
5967
5958
The color of the edges. Defaults to 'none'. Possible values:
@@ -6081,8 +6072,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6081
6072
collection .set_array (C )
6082
6073
collection .set_cmap (cmap )
6083
6074
collection .set_norm (norm )
6084
- collection .set_clim (vmin , vmax )
6085
- collection .autoscale_None ()
6075
+ collection ._scale_norm (norm , vmin , vmax )
6086
6076
6087
6077
self .grid (False )
6088
6078
@@ -6196,6 +6186,7 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6196
6186
automatically chosen by the `~.Normalize` instance (defaults to
6197
6187
the respective min/max values of *C* in case of the default linear
6198
6188
scaling).
6189
+ It is deprecated to use *vmin*/*vmax* when *norm* is given.
6199
6190
6200
6191
alpha : scalar, default: None
6201
6192
The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6278,10 +6269,9 @@ def pcolorfast(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
6278
6269
self .add_image (im )
6279
6270
ret = im
6280
6271
6281
- if vmin is not None or vmax is not None :
6282
- ret .set_clim (vmin , vmax )
6283
- elif np .ndim (C ) == 2 : # C.ndim == 3 is RGB(A) so doesn't need scaling.
6284
- ret .autoscale_None ()
6272
+ if np .ndim (C ) == 2 : # C.ndim == 3 is RGB(A) so doesn't need scaling.
6273
+ ret ._scale_norm (norm , vmin , vmax )
6274
+
6285
6275
if ret .get_clip_path () is None :
6286
6276
# image does not already have clipping set, clip to axes patch
6287
6277
ret .set_clip_path (self .patch )
0 commit comments