@@ -6248,8 +6248,9 @@ def imshow(self, X, cmap=None, norm=None, *, aspect=None,
62486248 See :doc:`/gallery/images_contours_and_fields/image_antialiasing` for
62496249 a discussion of image antialiasing.
62506250
6251- Only 'data' is available when using `~matplotlib.colors.BivarColormap`
6252- or `~matplotlib.colors.MultivarColormap`
6251+ When using a `~matplotlib.colors.BivarColormap` or
6252+ `~matplotlib.colors.MultivarColormap`, 'data' is the only valid
6253+ interpolation_stage.
62536254
62546255 alpha : float or array-like, optional
62556256 The alpha blending value, between 0 (transparent) and 1 (opaque).
@@ -6512,10 +6513,10 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
65126513
65136514 Parameters
65146515 ----------
6515- C : 2D or 3D array-like
6516+ C : 2D (I, J) or 3D (v, I, J) array-like
65166517 The color-mapped values. Color-mapping is controlled by *cmap*,
65176518 *norm*, *vmin*, and *vmax*. 3D arrays are supported only if the
6518- cmap supports v channels, where v is the size along the first axis .
6519+ cmap supports v channels.
65196520
65206521 X, Y : array-like, optional
65216522 The coordinates of the corners of quadrilaterals of a pcolormesh::
@@ -6642,12 +6643,14 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
66426643 shading = mpl .rcParams ['pcolor.shading' ]
66436644 shading = shading .lower ()
66446645
6646+ mcolorizer .ColorizingArtist ._check_exclusionary_keywords (colorizer ,
6647+ vmin = vmin , vmax = vmax ,
6648+ norm = norm , cmap = cmap )
66456649 if colorizer is None :
6646- cmap = mcolorizer ._ensure_cmap (cmap , accept_multivariate = True )
6647- C = mcolorizer ._ensure_multivariate_data (args [- 1 ], cmap .n_variates )
6648- else :
6649- C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6650- colorizer .cmap .n_variates )
6650+ colorizer = mcolorizer .Colorizer (cmap = cmap , norm = norm )
6651+
6652+ C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6653+ colorizer .cmap .n_variates )
66516654
66526655 X , Y , C , shading = self ._pcolorargs ('pcolor' , * args [:- 1 ], C ,
66536656 shading = shading , kwargs = kwargs )
@@ -6686,9 +6689,7 @@ def pcolor(self, *args, shading=None, alpha=None, norm=None, cmap=None,
66866689 coords = stack ([X , Y ], axis = - 1 )
66876690
66886691 collection = mcoll .PolyQuadMesh (
6689- coords , array = C , cmap = cmap , norm = norm , colorizer = colorizer ,
6690- alpha = alpha , ** kwargs )
6691- collection ._check_exclusionary_keywords (colorizer , vmin = vmin , vmax = vmax )
6692+ coords , array = C , colorizer = colorizer , alpha = alpha , ** kwargs )
66926693 collection ._scale_norm (norm , vmin , vmax )
66936694
66946695 coords = coords .reshape (- 1 , 2 ) # flatten the grid structure; keep x, y
@@ -6890,13 +6891,14 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
68906891 shading = mpl ._val_or_rc (shading , 'pcolor.shading' ).lower ()
68916892 kwargs .setdefault ('edgecolors' , 'none' )
68926893
6894+ mcolorizer .ColorizingArtist ._check_exclusionary_keywords (colorizer ,
6895+ vmin = vmin , vmax = vmax ,
6896+ norm = norm , cmap = cmap )
68936897 if colorizer is None :
6894- cmap = mcolorizer ._ensure_cmap (cmap , accept_multivariate = True )
6895- C = mcolorizer ._ensure_multivariate_data (args [- 1 ], cmap .n_variates )
6896- else :
6897- C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6898- colorizer .cmap .n_variates )
6898+ colorizer = mcolorizer .Colorizer (cmap = cmap , norm = norm )
68996899
6900+ C = mcolorizer ._ensure_multivariate_data (args [- 1 ],
6901+ colorizer .cmap .n_variates )
69006902
69016903 X , Y , C , shading = self ._pcolorargs ('pcolormesh' , * args [:- 1 ], C ,
69026904 shading = shading , kwargs = kwargs )
@@ -6906,8 +6908,7 @@ def pcolormesh(self, *args, alpha=None, norm=None, cmap=None, vmin=None,
69066908
69076909 collection = mcoll .QuadMesh (
69086910 coords , antialiased = antialiased , shading = shading ,
6909- array = C , cmap = cmap , norm = norm , colorizer = colorizer , alpha = alpha , ** kwargs )
6910- collection ._check_exclusionary_keywords (colorizer , vmin = vmin , vmax = vmax )
6911+ array = C , colorizer = colorizer , alpha = alpha , ** kwargs )
69116912 collection ._scale_norm (norm , vmin , vmax )
69126913
69136914 coords = coords .reshape (- 1 , 2 ) # flatten the grid structure; keep x, y
0 commit comments