Anonymous avatar Anonymous committed 92a1ed6

-don not remove classes without examples
-standard class coloring

Comments (0)

Files changed (1)

 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))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.