Skip to content
Snippets Groups Projects

Use new editor for valuesColor in Parameter dialog

Merged Kien Le requested to merge feature-#193-better_editor_for_valuesColor into develop
1 file
+ 7
9
Compare changes
  • Side-by-side
  • Inline
@@ -135,12 +135,10 @@ class Plotting:
"""
Plot 3 different values in 3 lines with 3 different colors according
to valueColors:
Ex: -1:M|0:R|1:Y means
value = -1 => plot on line y=-1 with M color
value = 0 => plot on line y=0 with R color
value = 1 => plot on line y=1 with Y color
Color codes are defined in colorSettings and limited in 'valColRE'
in dbSettings.py
Ex: "-1:#FF0000|0:#00FF00|1:#0000FF" means
value = -1 => plot on line y=-1 with #FF0000 color
value = 0 => plot on line y=0 with #00FF00 color
value = 1 => plot on line y=1 with #0000FF color
:param c_data: data of the channel which includes down-sampled
(if needed) data in keys 'times' and 'data'.
@@ -161,8 +159,8 @@ class Plotting:
total_sample_list = []
for vc in value_colors:
v, c = vc.split(':')
sample_no_colors.append(clr[c])
val = get_val(v)
sample_no_colors.append(c)
val = int(v)
indexes = np.where(c_data['data'][0] == val)[0]
times = c_data['times'][0][indexes]
@@ -180,7 +178,7 @@ class Plotting:
times, len(times) * [val], linestyle="",
marker='s', markersize=2,
zorder=constants.Z_ORDER['DOT'],
color=clr[c], picker=True, pickradius=3)
color=c, picker=True, pickradius=3)
ax.chan_plots.append(dots)
total_sample_list.append(len(times))
Loading