Changeset 7813:2f090ee261db in orange


Ignore:
Timestamp:
04/06/11 13:51:20 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
53a8a6b0b85f022c90518867a5a4d709ca5fe74e
Message:

Bug fixes in Gene Selection widget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/OWHist.py

    r6538 r7813  
    4040            nBins = len(values) 
    4141 
    42         (self.yData, self.xData) = numpy.histogram(values, bins=100) 
     42        self.yData, self.xData = numpy.histogram(values, bins=100) 
    4343        #if numpy version greater than 1.3 
    4444        if len(self.xData) == len(self.yData) + 1: 
    4545            self.xData = [(self.xData[i] + self.xData[i+1]) / 2. for i in range(len(self.xData) - 1)] 
    4646         
    47         self.minx = min(self.xData) 
     47        self.minx = min(self.xData)  
    4848        self.maxx = max(self.xData) 
    4949        self.miny = min(self.yData) 
     
    5757         
    5858    def setBoundary(self, lower, upper): 
     59        if not self.xData and not self.yData: 
     60            return 
     61         
    5962        self.lowerBoundary = lower 
    6063        self.upperBoundary = upper 
     
    98101 
    99102    def shadeTails(self): 
     103        if not self.xData and not self.yData: 
     104            return 
     105         
    100106        if self.type in ["hiTail", "twoTail"]: 
    101107            index = max(min(int(math.ceil(100*(self.upperBoundary-self.minx)/(self.maxx-self.minx))), 100), 0) 
Note: See TracChangeset for help on using the changeset viewer.