File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ def base_colors(res):
158158 colors = []
159159 # ensure not more colors than states
160160 for cmap in sequential_cmaps ()[: res .states [0 ]]:
161- color = cmap . resampled ( 1 )( 1 )
161+ color = cmap ( 0.5 )
162162 color = mpl .colors .rgb2hex (color , keep_alpha = False )
163163 colors .append (color )
164164
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def sequential_cmaps():
4848 cmap_ = mpl .colormaps [cmap ]
4949 except KeyError :
5050 color = mpl .colors .hex2color (cmap )
51- cmap_ = single_color_to_colormap (color , factor = 0.0 )
51+ cmap_ = single_color_to_colormap (color )
5252 cmaps .append (cmap_ )
5353 return cmaps
5454
@@ -126,7 +126,7 @@ def palette(
126126 n_shades = int (np .prod (states [1 :]))
127127 for i in range (n_cmaps ):
128128 cmap = cmaps [i ].resampled (n_shades + 1 )
129- colors .append (cmap (range ( 1 , n_shades + 1 )))
129+ colors .append (cmap (np . linspace ( 0 , 1 , n_shades )))
130130
131131 return np .concatenate (colors ).tolist ()
132132
You can’t perform that action at this time.
0 commit comments