(self, c_data, subset)
return pen, brush
Return the pens and colors whose color represent an index into
        a continuous 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 continuous 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 continuous 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_continuous_colors(self, c_data, subset):
        """
        Return the pens and colors whose color represent an index into
        a continuous 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.
        """
        palette = self.master.get_palette()

        if np.isnan(c_data).all():
            self.palette = palette
            return self._get_same_colors(subset, self.palette.nan_color)

        self.scale = DiscretizedScale(np.nanmin(c_data), np.nanmax(c_data))
        bins = self.scale.get_bins()
        self.palette = \
            colorpalettes.BinnedContinuousPalette.from_palette(palette, bins)
        colors = self.palette.values_to_colors(c_data)
        alphas = np.full((len(c_data), 1), self.alpha_value, dtype=np.ubyte)
        brush = np.hstack((colors, alphas))
        pen = np.hstack(
            ((colors.astype(dtype=float) * 100 / self.DarkerValue).astype(np.ubyte),
             alphas))

        # Reuse pens and brushes with the same colors because PyQtGraph then
        # builds smaller pixmap atlas, which makes the drawing faster

        def reuse(cache, fun, *args):
            if args not in cache:
                cache[args] = fun(args)
            return cache[args]

        def create_pen(col):
            return _make_pen(QColor(*col), 1.5)

        def create_brush(col):
            return QBrush(QColor(*col))

        if subset is not None:
            alpha_subset, alpha_unset = self._alpha_for_subsets()
            brush[:, 3] = 0
            brush[subset, 3] = alpha_subset
            pen[:, 3] = alpha_unset
            brush[subset, 3] = alpha_subset

        cached_pens = {}
        pen = [reuse(cached_pens, create_pen, *col) for col in pen.tolist()]
        cached_brushes = {}
        brush = np.array([reuse(cached_brushes, create_brush, *col)
                          for col in brush.tolist()])

        return pen, brush
def _get_continuous_colors ( self , c_data , subset ) : palette = self . master . get_palette ( ) if np . isnan ( c_data ) . all ( ) : self . palette = palette return self . _get_same_colors ( subset , self . palette . nan_color ) self . scale = DiscretizedScale ( np . nanmin ( c_data ) , np . nanmax ( c_data ) ) bins = self . scale . get_bins ( ) self . palette = colorpalettes . BinnedContinuousPalette . from_palette ( palette , bins ) colors = self . palette . values_to_colors ( c_data ) alphas = np . full ( ( len ( c_data ) , 1 ) , self . alpha_value , dtype = np . ubyte ) brush = np . hstack ( ( colors , alphas ) ) pen = np . hstack ( ( ( colors . astype ( dtype = float ) * 100 / self . DarkerValue ) . astype ( np . ubyte ) , alphas ) ) # Reuse pens and brushes with the same colors because PyQtGraph then # builds smaller pixmap atlas, which makes the drawing faster def reuse ( cache , fun , * args ) : if args not in cache : cache [ args ] = fun ( args ) return cache [ args ] def create_pen ( col ) : return _make_pen ( QColor ( * col ) , 1.5 ) def create_brush ( col ) : return QBrush ( QColor ( * col ) ) if subset is not None : alpha_subset , alpha_unset = self . _alpha_for_subsets ( ) brush [ : , 3 ] = 0 brush [ subset , 3 ] = alpha_subset pen [ : , 3 ] = alpha_unset brush [ subset , 3 ] = alpha_subset cached_pens = { } pen = [ reuse ( cached_pens , create_pen , * col ) for col in pen . tolist ( ) ] cached_brushes = { } brush = np . array ( [ reuse ( cached_brushes , create_brush , * col ) for col in brush . tolist ( ) ] ) return pen , brush