Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a263e9 commit c778bd9Copy full SHA for c778bd9
lib/matplotlib/image.py
@@ -293,6 +293,15 @@ def set_alpha(self, alpha):
293
self._imcache = None
294
295
def _get_scalar_alpha(self):
296
+ """
297
+ Get a scalar alpha value to be applied to the artist as a whole.
298
+
299
+ If the alpha value is a matrix, the method returns 1.0 because pixels
300
+ have individual alpha values (see `~._ImageBase._make_image` for
301
+ details). If the alpha value is a scalar, the method returns said value
302
+ to be applied to the artist as a whole because pixels do not have
303
+ individual alpha values.
304
305
return 1.0 if self._alpha is None or np.ndim(self._alpha) > 0 \
306
else self._alpha
307
0 commit comments