CommunitiesNode.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:ECoG-ClusterFlow 作者: sugeerth 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号