Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc778bd9

Browse files
committed
Add docstring to _get_scalar_alpha.
1 parent5a263e9 commitc778bd9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

‎lib/matplotlib/image.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,15 @@ def set_alpha(self, alpha):
293293
self._imcache=None
294294

295295
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+
"""
296305
return1.0ifself._alphaisNoneornp.ndim(self._alpha)>0 \
297306
elseself._alpha
298307

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp