bugfix: start scale at right color
This commit is contained in:
parent
39674665d8
commit
d0ef6abdc6
1 changed files with 1 additions and 1 deletions
|
|
@ -391,7 +391,7 @@ def color_scale( name, text ):
|
||||||
|
|
||||||
# normalize and scale over the nb of colors in cmap
|
# normalize and scale over the nb of colors in cmap
|
||||||
colormap = context["colormaps"][name]
|
colormap = context["colormaps"][name]
|
||||||
i = int( math.ceil( (f - context["scale"][0]) / (context["scale"][1]-context["scale"][0]) * len(colormap) ) ) - 1
|
i = int( math.ceil( (f - context["scale"][0]) / (context["scale"][1]-context["scale"][0]) * (len(colormap)-1) ) )
|
||||||
color = colormap[i]
|
color = colormap[i]
|
||||||
|
|
||||||
# infer mode from the color in the colormap
|
# infer mode from the color in the colormap
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue