Changeset 10779:ec10a0f84054 in orange


Ignore:
Timestamp:
04/11/12 14:06:05 (2 years ago)
Author:
mstajdohar
Branch:
default
Message:

Fixed marking in NetExplorerQwt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Unsupervised/OWNxExplorerQwt.py

    r10466 r10779  
    10011001        hubs = self.hubs 
    10021002        if hubs == 0: 
    1003             self.networkCanvas.setMarkedVertices([]) 
     1003            self.networkCanvas.set_marked_nodes([]) 
    10041004            self.networkCanvas.replot() 
    10051005            return 
     
    10121012 
    10131013            toMark = [i for i, values in enumerate(self.graph_base.items()) if txt.lower() in " ".join([str(values[ndx]).decode("ascii", "ignore").lower() for ndx in range(len(self.graph_base.items().domain)) + self.graph_base.items().domain.getmetas().keys()])] 
    1014             self.networkCanvas.setMarkedVertices(toMark) 
     1014            self.networkCanvas.set_marked_nodes(toMark) 
    10151015            self.networkCanvas.replot() 
    10161016            return 
     
    10361036            #print "mark at least N connections" 
    10371037            N = self.markNConnections 
    1038             self.networkCanvas.setMarkedVertices([i for i, power in enumerate(powers) if power >= N]) 
     1038            self.networkCanvas.set_marked_nodes([i for i, power in enumerate(powers) if power >= N]) 
    10391039            self.networkCanvas.replot() 
    10401040        elif hubs == 5: 
    10411041            #print "mark at most N connections" 
    10421042            N = self.markNConnections 
    1043             self.networkCanvas.setMarkedVertices([i for i, power in enumerate(powers) if power <= N]) 
     1043            self.networkCanvas.set_marked_nodes([i for i, power in enumerate(powers) if power <= N]) 
    10441044            self.networkCanvas.replot() 
    10451045        elif hubs == 6: 
    10461046            #print "mark more than any" 
    1047             self.networkCanvas.setMarkedVertices([i for i, power in enumerate(powers) if power > max([0] + [powers[nn] for nn in self.graph.getNeighbours(i)])]) 
     1047            self.networkCanvas.set_marked_nodes([i for i, power in enumerate(powers) if power > max([0] + [powers[nn] for nn in self.graph.getNeighbours(i)])]) 
    10481048            self.networkCanvas.replot() 
    10491049        elif hubs == 7: 
    10501050            #print "mark more than avg" 
    1051             self.networkCanvas.setMarkedVertices([i for i, power in enumerate(powers) if power > statc.mean([0] + [powers[nn] for nn in self.graph.getNeighbours(i)])]) 
     1051            self.networkCanvas.set_marked_nodes([i for i, power in enumerate(powers) if power > statc.mean([0] + [powers[nn] for nn in self.graph.getNeighbours(i)])]) 
    10521052            self.networkCanvas.replot() 
    10531053        elif hubs == 8: 
     
    10591059            while cutP < len(powers) and powers[sortedIdx[cutP]] == cutPower: 
    10601060                cutP += 1 
    1061             self.networkCanvas.setMarkedVertices(sortedIdx[:cutP]) 
     1061            self.networkCanvas.set_marked_nodes(sortedIdx[:cutP]) 
    10621062            self.networkCanvas.replot() 
    10631063        elif hubs == 9: 
     
    14441444            toMark = [i for (i, x) in enumerate(self.graph) if str(self.graph_base.items()[x][var]).strip().upper() in values] 
    14451445            #print "mark:", toMark 
    1446             self.networkCanvas.setMarkedVertices(list(toMark)) 
     1446            self.networkCanvas.set_marked_nodes(list(toMark)) 
    14471447            self.networkCanvas.replot() 
    14481448 
    14491449        else: 
    1450             self.networkCanvas.setMarkedVertices([]) 
     1450            self.networkCanvas.set_marked_nodes([]) 
    14511451            self.networkCanvas.replot() 
    14521452 
Note: See TracChangeset for help on using the changeset viewer.