@@ -6273,8 +6273,9 @@ def imshow(self, X, cmap=None, norm=None, *, aspect=None,
62736273 See :doc:`/gallery/images_contours_and_fields/image_antialiasing` for
62746274 a discussion of image antialiasing.
62756275
6276- Only 'data' is available when using `~matplotlib.colors.BivarColormap`
6277- or `~matplotlib.colors.MultivarColormap`
6276+ When using a `~matplotlib.colors.BivarColormap` or
6277+ `~matplotlib.colors.MultivarColormap`, 'data' is the only valid
6278+ interpolation_stage.
62786279
62796280 alpha : float or array-like, optional
62806281 The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6537,10 +6538,10 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
65376538
65386539 Parameters
65396540 ----------
6540- C : 2D or 3D array-like
6541+ C : 2D (I, J) or 3D (v, I, J) array-like
65416542 The color-mapped values. Color-mapping is controlled by *cmap*,
65426543 *norm*, *vmin*, and *vmax*. 3D arrays are supported only if the
6543- cmap supports v channels, where v is the size along the first axis .
6544+ cmap supports v channels.
65446545
65456546 X, Y : array-like, optional
65466547 The coordinates of the corners of quadrilaterals of a pcolormesh::
@@ -6665,12 +6666,14 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
66656666 shading = mpl .rcParams ['pcolor.shading' ]
66666667 shading = shading .lower ()
66676668
6669+ mcolorizer .ColorizingArtist ._check_exclusionary_keywords (colorizer ,
6670+ vmin = vmin , vmax = vmax ,
6671+ norm = norm , cmap = cmap )
66686672 if colorizer is None :
6669- cmap = mcolorizer ._ensure_cmap (cmap , accept_multivariate = True )
6670- C = mcolorizer ._ensure_multivariate_data (args [- 1 ], cmap .n_variates )
6671- else :
6672- C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6673- colorizer .cmap .n_variates )
6673+ colorizer = mcolorizer .Colorizer (cmap = cmap , norm = norm )
6674+
6675+ C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6676+ colorizer .cmap .n_variates )
66746677
66756678 X , Y , C , shading = self ._pcolorargs ('pcolor' , * args [:- 1 ], C ,
66766679 shading = shading , kwargs = kwargs )
@@ -6709,9 +6712,7 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
67096712 coords = stack ([X , Y ], axis = - 1 )
67106713
67116714 collection = mcoll .PolyQuadMesh (
6712- coords , array = C , cmap = cmap , norm = norm , colorizer = colorizer ,
6713- alpha = alpha , ** kwargs )
6714- collection ._check_exclusionary_keywords (colorizer , vmin = vmin , vmax = vmax )
6715+ coords , array = C , colorizer = colorizer , alpha = alpha , ** kwargs )
67156716 collection ._scale_norm (norm , vmin , vmax )
67166717
67176718 coords = coords .reshape (- 1 , 2 ) # flatten the grid structure; keep x, y
@@ -6914,13 +6915,14 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
69146915 shading = mpl ._val_or_rc (shading , 'pcolor.shading' ).lower ()
69156916 kwargs .setdefault ('edgecolors' , 'none' )
69166917
6918+ mcolorizer .ColorizingArtist ._check_exclusionary_keywords (colorizer ,
6919+ vmin = vmin , vmax = vmax ,
6920+ norm = norm , cmap = cmap )
69176921 if colorizer is None :
6918- cmap = mcolorizer ._ensure_cmap (cmap , accept_multivariate = True )
6919- C = mcolorizer ._ensure_multivariate_data (args [- 1 ], cmap .n_variates )
6920- else :
6921- C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6922- colorizer .cmap .n_variates )
6922+ colorizer = mcolorizer .Colorizer (cmap = cmap , norm = norm )
69236923
6924+ C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6925+ colorizer .cmap .n_variates )
69246926
69256927 X , Y , C , shading = self ._pcolorargs ('pcolormesh' , * args [:- 1 ], C ,
69266928 shading = shading , kwargs = kwargs )
@@ -6930,8 +6932,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
69306932
69316933 collection = mcoll .QuadMesh (
69326934 coords , antialiased = antialiased , shading = shading ,
6933- array = C , cmap = cmap , norm = norm , colorizer = colorizer , alpha = alpha , ** kwargs )
6934- collection ._check_exclusionary_keywords (colorizer , vmin = vmin , vmax = vmax )
6935+ array = C , colorizer = colorizer , alpha = alpha , ** kwargs )
69356936 collection ._scale_norm (norm , vmin , vmax )
69366937
69376938 coords = coords .reshape (- 1 , 2 ) # flatten the grid structure; keep x, y
0 commit comments