长句被剪掉,看不见。
如何设置networkx线长度?
我试过设定体型。但是这条线的长度一起增加了。
我的图像:
`
import matplotlib.pyplot as plt
import networkx as nx
graph = nx.Graph()
graph.add_nodes_from(('looooooooooooongtext','shorttext','asdasdasd',4,5))
graph.add_edges_from([('looooooooooooongtext','shorttext'), ('looooooooooooongtext','asdasdasd'),('looooooooooooongtext',5),('asdasdasd',5)])
graph.add_edge('looooooooooooongtext',4,weight=1)
plt.figure('result',figsize=(10,10))
nx.draw_circular(graph, with_labels=True,node_size=80,font_size=10)
plt.show()
`
目前没有回答
相关问题 更多 >
编程相关推荐