Commit 4f6f683e authored by Ivo Peterek's avatar Ivo Peterek

FIX: Sort xlabels and funclabels #13

parent 59264d51
......@@ -121,12 +121,23 @@ class DataLoad:
if len(data[1]['heat_data'])-1 < index_of_line:
data[1]['heat_data'].append([])
data[1]['heat_data'][index_of_line].append((funclabel_val, value))
data[1]['heat_data'][index_of_line].append((float(funclabel_val), value))
if value < data[1]['optim_y_val']: #optimal value is just minimum
data[1]['optim_y_val'] = value
else:
continue
#sort data
for y_label_data in data_region:
for i, heat_data_list in enumerate(y_label_data[1]['heat_data']):
y_label_data[1]['heat_data'][i] = sorted(heat_data_list)
lines_heat_data = zip(y_label_data[1]['lines'], y_label_data[1]['heat_data'])
lines_heat_data = sorted(lines_heat_data)
lines_heat_data = list(zip(*lines_heat_data))
y_label_data[1]['lines'] = lines_heat_data[0]
y_label_data[1]['heat_data'] = lines_heat_data[1]
if region == list(self.main_reg)[0]:
self.data["plot_summary_data"] = data_region
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment