1. biolab
  2. Untitled project
  3. orange-bioinformatics

Commits

tomazc  committed 92a1ed6

-don not remove classes without examples
-standard class coloring

  • Participants
  • Parent commits dfb0dff
  • Branches default

Comments (0)

Files changed (1)

File OWGenomeMap.py

View file
 from OWWidget import *
 from qtcanvas import *
 
+from OWGraph import ColorPaletteHSV
+
 localdir = os.path.dirname(__file__) or "."
 
 DEBUG = 0
             ## create color map
             self.colorByClassCB.setDisabled(self.data.domain.classVar == None)
             if self.data.domain.classVar:
-                self.classColors = []
-                for i in range(len(self.data.domain.classVar.values)):
-                    newColor = QColor()
-                    newColor.setHsv(i*360/len(self.data.domain.classVar.values), 255, 255)
-                    self.classColors.append(newColor)
+                self.classColors = ColorPaletteHSV(len(self.data.domain.classVar.values), 255)
             self.repaintChromeGraph()
 
 ##############################################################################
 
             # Reduce the number of class values, if class is defined
             cl = clo = data[0].domain.classVar
-            if cl:
-                cl = orange.RemoveUnusedValues(cl, ex, removeOneValued = 1)
+##            if cl:
+##                cl = orange.RemoveUnusedValues(cl, ex, removeOneValued = 1)
 
             # Construct a new domain only if the class has changed
             # (ie to lesser number of values or to one value (alias None))