Skip to content
Snippets Groups Projects
Commit 4a39ffe2 authored by Lan Dam's avatar Lan Dam
Browse files

correct the way to identify colors for mass pos

parent 0511c997
No related branches found
No related tags found
1 merge request!175correct the way to identify colors for mass pos
Pipeline #2951 passed with stage
in 2 minutes and 58 seconds
......@@ -385,18 +385,16 @@ class Plotting:
colors = [None] * len(y)
sizes = [1.5] * len(y)
for i in range(len(y)):
count = 0
prev_v = 0
count = -1
for v, c in value_colors:
if count < (len(value_colors) - 1):
if prev_v < abs(y[i]) <= v:
count += 1
if count <= len(value_colors) - 2:
if abs(y[i]) <= v:
colors[i] = clr[c]
break
else:
# The last value color
colors[i] = clr[c]
break
prev_v = v
count += 1
ax.scatter(x, y, marker='s', c=colors, s=sizes,
zorder=constants.Z_ORDER['DOT'])
ax.x_list = x_list
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment