(self, x)
return QColor(*color)
Return a QColor corresponding to value x. x may also be nan.
Return a QColor corresponding to value x. x may also be nan.
Return a QColor corresponding to value x . x may also be nan .
def value_to_qcolor(self, x):
        """
        Return a QColor corresponding to value x. x may also be nan.
        """
        if np.isnan(x):
            color = self.nan_color
        else:
            binx, _ = self._bin_indices([x])
            color = self.palette[binx[0]]
        return QColor(*color)
def value_to_qcolor ( self , x ) : if np . isnan ( x ) : color = self . nan_color else : binx , _ = self . _bin_indices ( [ x ] ) color = self . palette [ binx [ 0 ] ] return QColor ( * color )