def graphNetworkx(self, buds_visible = False, filter_assym_edges = False, labels_visible = True, iterations = 1000):
self.buds_visible = buds_visible
self.filter_assym_edges = filter_assym_edges
G = self.makeGraphData()
if hasattr(self, 'nodeColorInfo'):
nodeColors = self.useColorData(G, 'networkx')
#print G.node
if labels_visible:
nx.draw_networkx(G, pos=nx.spring_layout(G, iterations = iterations), node_color = nodeColors, linewidths = 1)
else:
nx.draw(G, pos=nx.spring_layout(G, iterations = iterations), node_color = nodeColors, linewidths = 1)
plt.show()
评论列表
文章目录