Changeset 7813:2f090ee261db in orange
 Timestamp:
 04/06/11 13:51:20 (3 years ago)
 Branch:
 default
 Convert:
 53a8a6b0b85f022c90518867a5a4d709ca5fe74e
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

orange/OrangeWidgets/OWHist.py
r6538 r7813 40 40 nBins = len(values) 41 41 42 (self.yData, self.xData)= numpy.histogram(values, bins=100)42 self.yData, self.xData = numpy.histogram(values, bins=100) 43 43 #if numpy version greater than 1.3 44 44 if len(self.xData) == len(self.yData) + 1: 45 45 self.xData = [(self.xData[i] + self.xData[i+1]) / 2. for i in range(len(self.xData)  1)] 46 46 47 self.minx = min(self.xData) 47 self.minx = min(self.xData) 48 48 self.maxx = max(self.xData) 49 49 self.miny = min(self.yData) … … 57 57 58 58 def setBoundary(self, lower, upper): 59 if not self.xData and not self.yData: 60 return 61 59 62 self.lowerBoundary = lower 60 63 self.upperBoundary = upper … … 98 101 99 102 def shadeTails(self): 103 if not self.xData and not self.yData: 104 return 105 100 106 if self.type in ["hiTail", "twoTail"]: 101 107 index = max(min(int(math.ceil(100*(self.upperBoundaryself.minx)/(self.maxxself.minx))), 100), 0)
Note: See TracChangeset
for help on using the changeset viewer.