@@ -837,9 +837,9 @@ def set_alpha(self, alpha):
837837
838838 Parameters
839839 ----------
840- alpha: float or array of float
840+ alpha: float or array of float or None
841841 If not None, *alpha* values must be between 0 and 1, inclusive.
842- If an array is provided, it's length must match the number of
842+ If an array is provided, its length must match the number of
843843 elements in the collection. Masked values and nans are not
844844 supported.
845845 """
@@ -867,13 +867,13 @@ def update_scalarmappable(self):
867867 return
868868 if np .iterable (self ._alpha ):
869869 if self ._alpha .size != self ._A .size :
870- # This can occur with the deprecated behavior of 'flat'
871- # pcolormesh shading. If we bring the current change in
872- # before that deprecated behavior is removed, we need to
873- # add the explanation to the message below.
874870 raise ValueError (f'Data array shape, { self ._A .shape } '
875871 'is incompatible with alpha array shape, '
876- f'{ self ._alpha .shape } .' )
872+ f'{ self ._alpha .shape } . '
873+ 'This can occur with the deprecated '
874+ 'behavior of the "flat" shading option, '
875+ 'in which a row and/or column of the data '
876+ 'array is dropped.' )
877877 # pcolormesh, scatter, maybe others flatten their _A
878878 self ._alpha = self ._alpha .reshape (self ._A .shape )
879879
0 commit comments