@@ -6158,8 +6158,9 @@ def imshow(self, X, cmap=None, norm=None, *, aspect=None,
61586158 See :doc:`/gallery/images_contours_and_fields/image_antialiasing` for
61596159 a discussion of image antialiasing.
61606160
6161- Only 'data' is available when using `~matplotlib.colors.BivarColormap`
6162- or `~matplotlib.colors.MultivarColormap`
6161+ When using a `~matplotlib.colors.BivarColormap` or
6162+ `~matplotlib.colors.MultivarColormap`, 'data' is the only valid
6163+ interpolation_stage.
61636164
61646165 alpha : float or array-like, optional
61656166 The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6422,10 +6423,10 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
64226423
64236424 Parameters
64246425 ----------
6425- C : 2D or 3D array-like
6426+ C : 2D (I, J) or 3D (v, I, J) array-like
64266427 The color-mapped values. Color-mapping is controlled by *cmap*,
64276428 *norm*, *vmin*, and *vmax*. 3D arrays are supported only if the
6428- cmap supports v channels, where v is the size along the first axis .
6429+ cmap supports v channels.
64296430
64306431 X, Y : array-like, optional
64316432 The coordinates of the corners of quadrilaterals of a pcolormesh::
@@ -6552,12 +6553,14 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
65526553 shading = mpl .rcParams ['pcolor.shading' ]
65536554 shading = shading .lower ()
65546555
6556+ mcolorizer .ColorizingArtist ._check_exclusionary_keywords (colorizer ,
6557+ vmin = vmin , vmax = vmax ,
6558+ norm = norm , cmap = cmap )
65556559 if colorizer is None :
6556- cmap = mcolorizer ._ensure_cmap (cmap , accept_multivariate = True )
6557- C = mcolorizer ._ensure_multivariate_data (args [- 1 ], cmap .n_variates )
6558- else :
6559- C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6560- colorizer .cmap .n_variates )
6560+ colorizer = mcolorizer .Colorizer (cmap = cmap , norm = norm )
6561+
6562+ C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6563+ colorizer .cmap .n_variates )
65616564
65626565 X , Y , C , shading = self ._pcolorargs ('pcolor' , * args [:- 1 ], C ,
65636566 shading = shading , kwargs = kwargs )
@@ -6596,9 +6599,7 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
65966599 coords = stack ([X , Y ], axis = - 1 )
65976600
65986601 collection = mcoll .PolyQuadMesh (
6599- coords , array = C , cmap = cmap , norm = norm , colorizer = colorizer ,
6600- alpha = alpha , ** kwargs )
6601- collection ._check_exclusionary_keywords (colorizer , vmin = vmin , vmax = vmax )
6602+ coords , array = C , colorizer = colorizer , alpha = alpha , ** kwargs )
66026603 collection ._scale_norm (norm , vmin , vmax )
66036604
66046605 coords = coords .reshape (- 1 , 2 ) # flatten the grid structure; keep x, y
@@ -6800,13 +6801,14 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
68006801 shading = mpl ._val_or_rc (shading , 'pcolor.shading' ).lower ()
68016802 kwargs .setdefault ('edgecolors' , 'none' )
68026803
6804+ mcolorizer .ColorizingArtist ._check_exclusionary_keywords (colorizer ,
6805+ vmin = vmin , vmax = vmax ,
6806+ norm = norm , cmap = cmap )
68036807 if colorizer is None :
6804- cmap = mcolorizer ._ensure_cmap (cmap , accept_multivariate = True )
6805- C = mcolorizer ._ensure_multivariate_data (args [- 1 ], cmap .n_variates )
6806- else :
6807- C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6808- colorizer .cmap .n_variates )
6808+ colorizer = mcolorizer .Colorizer (cmap = cmap , norm = norm )
68096809
6810+ C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6811+ colorizer .cmap .n_variates )
68106812
68116813 X , Y , C , shading = self ._pcolorargs ('pcolormesh' , * args [:- 1 ], C ,
68126814 shading = shading , kwargs = kwargs )
@@ -6816,8 +6818,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
68166818
68176819 collection = mcoll .QuadMesh (
68186820 coords , antialiased = antialiased , shading = shading ,
6819- array = C , cmap = cmap , norm = norm , colorizer = colorizer , alpha = alpha , ** kwargs )
6820- collection ._check_exclusionary_keywords (colorizer , vmin = vmin , vmax = vmax )
6821+ array = C , colorizer = colorizer , alpha = alpha , ** kwargs )
68216822 collection ._scale_norm (norm , vmin , vmax )
68226823
68236824 coords = coords .reshape (- 1 , 2 ) # flatten the grid structure; keep x, y
0 commit comments