Пример #1
0
 def changed(self):
     tcolors = [ (tuple(rgba),) for rgba in self.to_rgba(self.cvalues)]
     self.tcolors = tcolors
     contourNum = 0
     for color, collection in zip(tcolors, self.collections):
         collection.set_color(color)
     for label, cv in zip(self.cl, self.cl_cvalues):
         label.set_color(self.label_mappable.to_rgba(cv))
     # add label colors
     ScalarMappable.changed(self)
Пример #2
0
 def changed(self):
     tcolors = [ (tuple(rgba),) for rgba in self.to_rgba(self.cvalues)]
     self.tcolors = tcolors
     contourNum = 0
     for color, collection in zip(tcolors, self.collections):
         collection.set_color(color)
     for label, cv in zip(self.cl, self.cl_cvalues):
         label.set_color(self.label_mappable.to_rgba(cv))
     # add label colors
     ScalarMappable.changed(self)
Пример #3
0
    def changed(self):
        colors = [ (tuple(rgba),) for rgba in self.to_rgba(self.levels)]
        contourNum = 0
        for color, collection in zip(colors, self.collections):
            collection.set_color(color)
            Ncolor = len(color) # collections could have more than 1 in principle
            for segNum, segment in enumerate(collection._segments):
                key = contourNum, segNum
                t = self.labeld.get(key)
                if t is not None: t.set_color(color[segNum%Ncolor])
            contourNum += 1

        ScalarMappable.changed(self)