Skip to content

Commit f4361ed

Browse files
committed
improved docstring for MultivarColormap
1 parent a2fb40c commit f4361ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/colors.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1270,9 +1270,9 @@ def __init__(self, colormaps, combination_mode, name='multivariate colormap'):
12701270
Describe how colormaps are combined in sRGB space
12711271
12721272
- If 'sRGB_add' -> Mixing produces brighter colors
1273-
`sRGB = cmap[0][X[0]] + cmap[1][x[1]] + ... + cmap[n-1][x[n-1]]`
1273+
`sRGB = sum(colors)`
12741274
- If 'sRGB_sub' -> Mixing produces darker colors
1275-
`sRGB = cmap[0][X[0]] + cmap[1][x[1]] + ... + cmap[n-1][x[n-1]] - n + 1`
1275+
`sRGB = 1 - sum(1 - colors)`
12761276
name : str, optional
12771277
The name of the colormap family.
12781278
"""

0 commit comments

Comments
 (0)