Exemple #1
0
 def color(self, interval, value):
     """
     Map a value into a color
     
     :param qwt.interval.QwtInterval interval: valid interval for value
     :param float value: value
     :return: the color corresponding to value
     
     .. warning ::
         
         This method is slow for Indexed color maps. If it is necessary to 
         map many values, its better to get the color table once and find 
         the color using `colorIndex()`.
     """
     if self.__format == self.RGB:
         return QColor.fromRgba(self.rgb(interval, value))
     else:
         index = self.colorIndex(interval, value)
         return self.colorTable(interval)[index]
Exemple #2
0
 def color(self, interval, value):
     """
     Map a value into a color
     
     :param qwt.interval.QwtInterval interval: valid interval for value
     :param float value: value
     :return: the color corresponding to value
     
     .. warning ::
         
         This method is slow for Indexed color maps. If it is necessary to 
         map many values, its better to get the color table once and find 
         the color using `colorIndex()`.
     """
     if self.__format == self.RGB:
         return QColor.fromRgba(self.rgb(interval, value))
     else:
         index = self.colorIndex(interval, value)
         return self.colorTable(interval)[index]
Exemple #3
0
 def color(self, interval, value):
     if self.__format == self.RGB:
         return QColor.fromRgba(self.rgb(interval, value))
     else:
         index = self.colorIndex(interval, value)
         return self.colorTable(interval)[index]
Exemple #4
0
 def color(self, interval, value):
     if self.__format == self.RGB:
         return QColor.fromRgba(self.rgb(interval, value))
     else:
         index = self.colorIndex(interval, value)
         return self.colorTable(interval)[index]