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)
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)
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)
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)
def clear_plot(self): self.plot_set[self.plot_index] = [] config.set_plot_info(self.plot_set, self.normalize)
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)
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)