(self, x, y, colors, cutpoint_x=None, selection_limit=None,
               names=None)
Function replots a graph.

        Parameters
        ----------
        x : np.ndarray
            One-dimensional array with X coordinates of the points
        y : array-like
            List of np.ndarrays that contains an array of Y values for each
            sequence.
        colors : array-like
            List of Qt colors (eg. Qt.red) for each sequence.
        cutpoint_x : int, optional
            A starting cutpoint - the location of the vertical line.
        selection_limit : tuple
            The tuple of two values that limit the range for selection.
        names : array-like
            The name of each sequence that shows in the legend, if None
            legend is not shown.
        legend_anchor : array-like
            The anchor of the legend in the graph
Function replots a graph.
Function replots a graph .
def update(self, x, y, colors, cutpoint_x=None, selection_limit=None,
               names=None):
        """
        Function replots a graph.

        Parameters
        ----------
        x : np.ndarray
            One-dimensional array with X coordinates of the points
        y : array-like
            List of np.ndarrays that contains an array of Y values for each
            sequence.
        colors : array-like
            List of Qt colors (eg. Qt.red) for each sequence.
        cutpoint_x : int, optional
            A starting cutpoint - the location of the vertical line.
        selection_limit : tuple
            The tuple of two values that limit the range for selection.
        names : array-like
            The name of each sequence that shows in the legend, if None
            legend is not shown.
        legend_anchor : array-like
            The anchor of the legend in the graph
        """
        self.clear_plot()
        if names is None:
            names = [None] * len(y)

        self.sequences = y
        self.x = x
        self.selection_limit = selection_limit

        self.data_increasing = [np.sum(d[1:] - d[:-1]) > 0 for d in y]

        # plot sequence
        for s, c, n, inc in zip(y, colors, names, self.data_increasing):
            c = QColor(c)
            self.plot(x, s, pen=mkPen(c, width=2), antialias=True)

            if n is not None:
                label = TextItem(
                    text=n, anchor=(0, 1), color=QColor(0, 0, 0, 128))
                label.setPos(x[-1], s[-1])
                self._set_anchor(label, len(x) - 1, inc)
                self.addItem(label)

        self._plot_cutpoint(cutpoint_x)
        self.autoRange()
def update ( self , x , y , colors , cutpoint_x = None , selection_limit = None , names = None ) : self . clear_plot ( ) if names is None : names = [ None ] * len ( y ) self . sequences = y self . x = x self . selection_limit = selection_limit self . data_increasing = [ np . sum ( d [ 1 : ] - d [ : - 1 ] ) > 0 for d in y ] # plot sequence for s , c , n , inc in zip ( y , colors , names , self . data_increasing ) : c = QColor ( c ) self . plot ( x , s , pen = mkPen ( c , width = 2 ) , antialias = True ) if n is not None : label = TextItem ( text = n , anchor = ( 0 , 1 ) , color = QColor ( 0 , 0 , 0 , 128 ) ) label . setPos ( x [ - 1 ] , s [ - 1 ] ) self . _set_anchor ( label , len ( x ) - 1 , inc ) self . addItem ( label ) self . _plot_cutpoint ( cutpoint_x ) self . autoRange ( )