(self, c_data, subset)
return pen, brush
Return the pens and colors whose color represent an index into
        a discrete palette. The same color is used for pen and brush,
        except the former is darker. If the data has a subset, the brush
        is transparent for points that are not in the subset.
Return the pens and colors whose color represent an index into
        a discrete palette. The same color is used for pen and brush,
        except the former is darker. If the data has a subset, the brush
        is transparent for points that are not in the subset.
Return the pens and colors whose color represent an index into a discrete palette . The same color is used for pen and brush except the former is darker . If the data has a subset the brush is transparent for points that are not in the subset .
def _get_discrete_colors(self, c_data, subset):
        """
        Return the pens and colors whose color represent an index into
        a discrete palette. The same color is used for pen and brush,
        except the former is darker. If the data has a subset, the brush
        is transparent for points that are not in the subset.
        """
        self.palette = self.master.get_palette()
        c_data = c_data.copy()
        c_data[np.isnan(c_data)] = len(self.palette)
        c_data = c_data.astype(int)
        colors = self.palette.qcolors_w_nan
        if subset is None:
            for col in colors:
                col.setAlpha(self.alpha_value)
            pens = np.array(
                [_make_pen(col.darker(self.DarkerValue), 1.5)
                 for col in colors])
            pen = pens[c_data]
            brushes = np.array([QBrush(col) for col in colors])
            brush = brushes[c_data]
        else:
            subset_colors = [QColor(col) for col in colors]
            alpha_subset, alpha_unset = self._alpha_for_subsets()
            for col in subset_colors:
                col.setAlpha(alpha_subset)
            for col in colors:
                col.setAlpha(alpha_unset)

            pens, subset_pens = (
                np.array(
                    [_make_pen(col.darker(self.DarkerValue), 1.5)
                     for col in cols])
                for cols in (colors, subset_colors))
            pen = np.where(subset, subset_pens[c_data], pens[c_data])

            brushes = np.array([QBrush(col) for col in subset_colors])
            brush = brushes[c_data]
            black = np.full(len(brush), QBrush(QColor(0, 0, 0, 0)))
            brush = np.where(subset, brush, black)
        return pen, brush
def _get_discrete_colors ( self , c_data , subset ) : self . palette = self . master . get_palette ( ) c_data = c_data . copy ( ) c_data [ np . isnan ( c_data ) ] = len ( self . palette ) c_data = c_data . astype ( int ) colors = self . palette . qcolors_w_nan if subset is None : for col in colors : col . setAlpha ( self . alpha_value ) pens = np . array ( [ _make_pen ( col . darker ( self . DarkerValue ) , 1.5 ) for col in colors ] ) pen = pens [ c_data ] brushes = np . array ( [ QBrush ( col ) for col in colors ] ) brush = brushes [ c_data ] else : subset_colors = [ QColor ( col ) for col in colors ] alpha_subset , alpha_unset = self . _alpha_for_subsets ( ) for col in subset_colors : col . setAlpha ( alpha_subset ) for col in colors : col . setAlpha ( alpha_unset ) pens , subset_pens = ( np . array ( [ _make_pen ( col . darker ( self . DarkerValue ) , 1.5 ) for col in cols ] ) for cols in ( colors , subset_colors ) ) pen = np . where ( subset , subset_pens [ c_data ] , pens [ c_data ] ) brushes = np . array ( [ QBrush ( col ) for col in subset_colors ] ) brush = brushes [ c_data ] black = np . full ( len ( brush ) , QBrush ( QColor ( 0 , 0 , 0 , 0 ) ) ) brush = np . where ( subset , brush , black ) return pen , brush