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

Appearance settings

Commit 8c60f78

Browse filesBrowse files
committed
Add alpha compositing note to "matplotlib.pyplot.imshow" definition.
References #9906 and #9959.
1 parent e68e9dc commit 8c60f78
Copy full SHA for 8c60f78

File tree

Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-0
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5129,6 +5129,16 @@ def imshow(self, X, cmap=None, norm=None, aspect=None,
51295129
coordinates. In other words: the origin will coincide with the center
51305130
of pixel (0, 0).
51315131
5132+
Two typical representations are used for RGB images with an alpha
5133+
channel:
5134+
5135+
- Straight (unassociated) alpha: R, G, and B channels represent the
5136+
color of the pixel, disregarding its opacity.
5137+
- Premultiplied (associated) alpha: R, G, and B channels represent
5138+
the color of the pixel, adjusted for its opacity by multiplication.
5139+
5140+
`~matplotlib.pyplot.imshow` expects RGB images adopting the straight
5141+
(unassociated) alpha representation.
51325142
"""
51335143

51345144
if not self._hold:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.