def drawSubClusters(self, painter, radius):
# Extrapolate the graph metrics and rank
Clusters = len(self.correspondingNodes)
step = float(math.pi/Clusters)
Radius = self.radius
angle = 0.0
c = 0
for i in self.correspondingNodes:
painter.setBrush(QtCore.Qt.blue)
painter.setPen(QtGui.QPen(QtCore.Qt.black, 0))
x = Radius * math.sin((2*c*math.pi)/Clusters)
y = Radius * math.cos((2*c*math.pi)/Clusters)
c = c + 1
# radius = float(self.graphWidget.widget.Centrality[i]*100)
radius = 10
# print radiuss
painter.drawEllipse(x,y,radius, radius)
angle = angle + step
评论列表
文章目录