Changeset 10779:ec10a0f84054 in orange for Orange/OrangeWidgets/Unsupervised/OWNxExplorerQwt.py
Legend:
 Unmodified
 Added
 Removed

Orange/OrangeWidgets/Unsupervised/OWNxExplorerQwt.py
r10466 r10779 1001 1001 hubs = self.hubs 1002 1002 if hubs == 0: 1003 self.networkCanvas.set MarkedVertices([])1003 self.networkCanvas.set_marked_nodes([]) 1004 1004 self.networkCanvas.replot() 1005 1005 return … … 1012 1012 1013 1013 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.set MarkedVertices(toMark)1014 self.networkCanvas.set_marked_nodes(toMark) 1015 1015 self.networkCanvas.replot() 1016 1016 return … … 1036 1036 #print "mark at least N connections" 1037 1037 N = self.markNConnections 1038 self.networkCanvas.set MarkedVertices([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]) 1039 1039 self.networkCanvas.replot() 1040 1040 elif hubs == 5: 1041 1041 #print "mark at most N connections" 1042 1042 N = self.markNConnections 1043 self.networkCanvas.set MarkedVertices([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]) 1044 1044 self.networkCanvas.replot() 1045 1045 elif hubs == 6: 1046 1046 #print "mark more than any" 1047 self.networkCanvas.set MarkedVertices([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)])]) 1048 1048 self.networkCanvas.replot() 1049 1049 elif hubs == 7: 1050 1050 #print "mark more than avg" 1051 self.networkCanvas.set MarkedVertices([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)])]) 1052 1052 self.networkCanvas.replot() 1053 1053 elif hubs == 8: … … 1059 1059 while cutP < len(powers) and powers[sortedIdx[cutP]] == cutPower: 1060 1060 cutP += 1 1061 self.networkCanvas.set MarkedVertices(sortedIdx[:cutP])1061 self.networkCanvas.set_marked_nodes(sortedIdx[:cutP]) 1062 1062 self.networkCanvas.replot() 1063 1063 elif hubs == 9: … … 1444 1444 toMark = [i for (i, x) in enumerate(self.graph) if str(self.graph_base.items()[x][var]).strip().upper() in values] 1445 1445 #print "mark:", toMark 1446 self.networkCanvas.set MarkedVertices(list(toMark))1446 self.networkCanvas.set_marked_nodes(list(toMark)) 1447 1447 self.networkCanvas.replot() 1448 1448 1449 1449 else: 1450 self.networkCanvas.set MarkedVertices([])1450 self.networkCanvas.set_marked_nodes([]) 1451 1451 self.networkCanvas.replot() 1452 1452
Note: See TracChangeset
for help on using the changeset viewer.