File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
glue_vispy_viewers/volume Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,12 @@ def get_mpl_cmap(cmap, stretch):
5757 if isinstance (cmap , ListedColormap ):
5858 colors = cmap .colors
5959 n_colors = len (colors )
60- ts = stretch ([index / n_colors for index in range (len ( colors ) )])
61- colors = [color + [ t ] for t , color in zip (ts , colors )]
60+ ts = stretch ([index / n_colors for index in range (n_colors )])
61+ colors = [[ * color , t ] for t , color in zip (ts , colors )]
6262 else :
6363 n_colors = 256
6464 ts = stretch ([index / n_colors for index in range (n_colors )])
65- colors = [cmap (t )[:3 ] + ( t ,) for t in ts ]
65+ colors = [[ * cmap (t )[:3 ], t ] for t in ts ]
6666
6767 stretch_glsl = glsl_for_stretch (stretch )
6868 template = create_cmap_template (n_colors , stretch_glsl )
You can’t perform that action at this time.
0 commit comments