@@ -41,7 +41,7 @@ def test_bivariate_cmap_shapes():
41
41
def test_multivar_creation ():
42
42
# test creation of a custom multivariate colorbar
43
43
blues = mpl .colormaps ['Blues' ]
44
- cmap = mpl .colors .MultivarColormap ('custom' , (blues , 'Oranges' ), 'Sub ' )
44
+ cmap = mpl .colors .MultivarColormap ('custom' , (blues , 'Oranges' ), 'sRGB_sub ' )
45
45
y , x = np .mgrid [0 :3 , 0 :3 ]/ 2
46
46
im = cmap ((y , x ))
47
47
res = np .array ([[[0.96862745 , 0.94509804 , 0.92156863 , 1 ],
@@ -56,11 +56,11 @@ def test_multivar_creation():
56
56
assert_allclose (im , res , atol = 0.01 )
57
57
58
58
with pytest .raises (ValueError , match = "colormaps must be a list of" ):
59
- cmap = mpl .colors .MultivarColormap ('custom' , (blues , [blues ]), 'Sub ' )
59
+ cmap = mpl .colors .MultivarColormap ('custom' , (blues , [blues ]), 'sRGB_sub ' )
60
60
with pytest .raises (ValueError , match = "A MultivarColormap must" ):
61
- cmap = mpl .colors .MultivarColormap ('custom' , 'blues' , 'Sub ' )
61
+ cmap = mpl .colors .MultivarColormap ('custom' , 'blues' , 'sRGB_sub ' )
62
62
with pytest .raises (ValueError , match = "A MultivarColormap must" ):
63
- cmap = mpl .colors .MultivarColormap ('custom' , (blues ), 'Sub ' )
63
+ cmap = mpl .colors .MultivarColormap ('custom' , (blues ), 'sRGB_sub ' )
64
64
65
65
66
66
@image_comparison (["multivar_alpha_mixing.png" ])
@@ -72,7 +72,7 @@ def test_multivar_alpha_mixing():
72
72
alpha [:, 3 ] = np .linspace (1 , 0 , 256 )
73
73
alpha_cmap = mpl .colors .LinearSegmentedColormap .from_list ('from_list' , alpha )
74
74
75
- cmap = mpl .colors .MultivarColormap ('custom' , (rainbow , alpha_cmap ), 'Add ' )
75
+ cmap = mpl .colors .MultivarColormap ('custom' , (rainbow , alpha_cmap ), 'sRGB_add ' )
76
76
y , x = np .mgrid [0 :10 , 0 :10 ]/ 9
77
77
im = cmap ((y , x ))
78
78
@@ -185,7 +185,7 @@ def test_multivar_cmap_call():
185
185
186
186
def test_multivar_bad_mode ():
187
187
cmap = mpl .multivar_colormaps ['2VarSubA' ]
188
- with pytest .raises (ValueError , match = "Combination_mode must be 'Add ' or 'Sub' " ):
188
+ with pytest .raises (ValueError , match = "Combination_mode must be 'sRGB_add ' or" ):
189
189
cmap = mpl .colors .MultivarColormap ('' , cmap [:], 'bad' )
190
190
191
191
@@ -508,7 +508,7 @@ def test_multivar_eq():
508
508
509
509
cmap_1 = mpl .colors .MultivarColormap ('2VarAddA' ,
510
510
[cmap_0 [0 ]]* 2 ,
511
- 'Add ' )
511
+ 'sRGB_add ' )
512
512
assert (cmap_0 == cmap_1 ) is False
513
513
514
514
cmap_1 = mpl .multivar_colormaps ['3VarAddA' ]
@@ -519,5 +519,5 @@ def test_multivar_eq():
519
519
assert (cmap_0 == cmap_1 ) is False
520
520
521
521
cmap_1 = mpl .multivar_colormaps ['2VarAddA' ]
522
- cmap_1 = mpl .colors .MultivarColormap ('' , cmap_1 [:], 'Sub ' )
522
+ cmap_1 = mpl .colors .MultivarColormap ('' , cmap_1 [:], 'sRGB_sub ' )
523
523
assert (cmap_0 == cmap_1 ) is False
0 commit comments