def show_scene_section(self, x1: float, x2: float): start = int(x1) if x1 > 0 else 0 end = int(x2) if x2 < self.num_samples else self.num_samples path = path_creator.create_path(np.log10(self.plot_data), start, end) self.path_item.setPath(path) try: peak_path = path_creator.create_path(np.log10(self.peak), start, end) self.peak_item.setPath(peak_path) except RuntimeWarning: pass
def show_scene_section(self, x1: float, x2: float, subpath_ranges=None, colors=None): start = int(x1) if x1 > 0 else 0 end = int(x2) if x2 < self.num_samples else self.num_samples paths = path_creator.create_path(np.log10(self.plot_data), start, end) self.set_path(paths, colors=None) try: if len(self.peak) > 0: peak_path = path_creator.create_path(np.log10(self.peak), start, end)[0] self.peak_item.setPath(peak_path) except RuntimeWarning: pass
def show_scene_section(self, x1: float, x2: float, subpath_ranges=None, colors=None): """ :param x1: start of section to show :param x2: end of section to show :param subpath_ranges: for coloring subpaths :type subpath_ranges: list of tuple :param colors: for coloring the subpaths :type color: list of QColor :return: """ paths = path_creator.create_path(self.plot_data, start=self.__limit_value(x1), end=self.__limit_value(x2), subpath_ranges=subpath_ranges) self.set_path(paths, colors=colors)
def show_scene_section(self, x1: float, x2: float): path = path_creator.create_path(self.plot_data, self.__limit_value(x1), self.__limit_value(x2)) self.path_item.setPath(path)