8000 Better descriptors for 'Add' and 'Sub' in colors.MultivarColormap · matplotlib/matplotlib@f863ed6 · GitHub
[go: up one dir, main page]

Skip to content

Commit f863ed6

Browse files
committed
Better descriptors for 'Add' and 'Sub' in colors.MultivarColormap
1 parent 2969a3e commit f863ed6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/matplotlib/colors.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,8 +1258,11 @@ def __init__(self, name, colormaps, combination_mode):
12581258
The individual colormaps that are combined
12591259
combination_mode: str, 'Add' or 'Sub'
12601260
Describe how colormaps are combined in sRGB space
1261-
'Add' -> additive
1262-
'Sub' -> subtractive
1261+
1262+
- If 'Add' -> Mixing produces brighter colors
1263+
`sRGB = cmap[0][X[0]] + cmap[1][x[1]] + ... + cmap[n-1][x[n-1]]`
1264+
- If 'Sub' -> Mixing produces darker colors
1265+
`sRGB = cmap[0][X[0]] + cmap[1][x[1]] + ... + cmap[n-1][x[n-1]] - n + 1`
12631266
"""
12641267
self.name = name
12651268

0 commit comments

Comments
 (0)
0