示例#1
0
 def action(self, value):
     data_columns = config.get_datafile().get_data_columns()
     if data_columns[value] in self.plot_set[self.plot_index]:
         self.plot_set[self.plot_index].remove(data_columns[value])
     else:
         self.plot_set[self.plot_index].append(data_columns[value])
     config.set_plot_info(self.plot_set, self.normalize)
示例#2
0
 def normalize_plot(self):
     if self.plot_index in self.normalize:
         self.normalize.remove(self.plot_index)
     else:
         self.normalize.append(self.plot_index)
         self.normalize.sort()
     config.set_plot_info(self.plot_set, self.normalize)
示例#3
0
 def remove_plot(self):
     del self.plot_set[self.plot_index]
     self.normalize.remove(
         self.plot_index) if self.plot_index in self.normalize else None
     self.normalize = [
         i if i < self.plot_index else i - 1 for i in self.normalize[:]
     ]
     config.set_plot_info(self.plot_set, self.normalize)
示例#4
0
 def reset_all(self):
     self.plot_set = [[i] for i in config.get_datafile().get_data_columns()]
     self.normalize = []
     config.set_plot_info(self.plot_set, self.normalize)
示例#5
0
 def clear_plot(self):
     self.plot_set[self.plot_index] = []
     config.set_plot_info(self.plot_set, self.normalize)
示例#6
0
 def add_after(self):
     self.plot_set.insert(self.plot_index + 1, [])
     self.normalize = [
         i + 1 if i > self.plot_index else i for i in self.normalize[:]
     ]
     config.set_plot_info(self.plot_set, self.normalize)
示例#7
0
 def add_before(self):
     self.plot_set.insert(self.plot_index, [])
     self.normalize = [
         i if i < self.plot_index else i + 1 for i in self.normalize[:]
     ]
     config.set_plot_info(self.plot_set, self.normalize)