(self)
Trigger the update of coordinates while keeping other features intact.

        The method gets the coordinates by calling `self.get_coordinates`,
        which in turn calls the widget's `get_coordinate_data`. The number of
        coordinate pairs returned by the latter must match the current number
        of points. If this is not the case, the widget should trigger
        the complete update by calling `reset_graph` instead of this method.
Trigger the update of coordinates while keeping other features intact.
Trigger the update of coordinates while keeping other features intact .
def update_coordinates(self):
        """
        Trigger the update of coordinates while keeping other features intact.

        The method gets the coordinates by calling `self.get_coordinates`,
        which in turn calls the widget's `get_coordinate_data`. The number of
        coordinate pairs returned by the latter must match the current number
        of points. If this is not the case, the widget should trigger
        the complete update by calling `reset_graph` instead of this method.
        """
        x, y = self.get_coordinates()
        if x is None or len(x) == 0:
            return

        self._reset_view(x, y)
        if self.scatterplot_item is None:
            if self.sample_indices is None:
                indices = np.arange(self.n_valid)
            else:
                indices = self.sample_indices
            kwargs = dict(x=x, y=y, data=indices)
            self.scatterplot_item = ScatterPlotItem(**kwargs)
            self.scatterplot_item.sigClicked.connect(self.select_by_click)
            self.scatterplot_item_sel = ScatterPlotItem(**kwargs)
            self.plot_widget.addItem(self.scatterplot_item_sel)
            self.plot_widget.addItem(self.scatterplot_item)
        else:
            self.scatterplot_item.setCoordinates(x, y)
            self.scatterplot_item_sel.setCoordinates(x, y)
            self.update_labels()

        self.update_density()
def update_coordinates ( self ) : x , y = self . get_coordinates ( ) if x is None or len ( x ) == 0 : return self . _reset_view ( x , y ) if self . scatterplot_item is None : if self . sample_indices is None : indices = np . arange ( self . n_valid ) else : indices = self . sample_indices kwargs = dict ( x = x , y = y , data = indices ) self . scatterplot_item = ScatterPlotItem ( * * kwargs ) self . scatterplot_item . sigClicked . connect ( self . select_by_click ) self . scatterplot_item_sel = ScatterPlotItem ( * * kwargs ) self . plot_widget . addItem ( self . scatterplot_item_sel ) self . plot_widget . addItem ( self . scatterplot_item ) else : self . scatterplot_item . setCoordinates ( x , y ) self . scatterplot_item_sel . setCoordinates ( x , y ) self . update_labels ( ) self . update_density ( )