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

modify plot_up_down_dots to plot correctly 1, 0 values no matter of the order...

modify plot_up_down_dots to plot correctly 1, 0 values no matter of the order they are entered into DB
parent af02c138
No related branches found
No related tags found
1 merge request!165Fix SOH info not show for bottom of Jerk/DPS and display all info lines for the case data point clicked matches more than one SOH lines.
......@@ -150,18 +150,19 @@ class Plotting:
has_min_max_lines=False)
val_cols = chan_db_info['valueColors'].split('|')
points_list = []
colors = []
# up/down has 2 values: 0, 1 which match with index of points_list
points_list = [[], []]
colors = [[], []]
for vc in val_cols:
v, c = vc.split(':')
val = get_val(v)
val = int(get_val(v))
points = []
for times, data in zip(c_data['times'], c_data['data']):
points += [times[i]
for i in range(len(data))
if data[i] == val]
points_list.append(points)
colors.append(c)
points_list[val] = points
colors[val] = c
# down dots
ax.plot(points_list[0], len(points_list[0]) * [-0.5], linestyle="",
......
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