[英]Reading a huge edgelist and plot it in NetworkX
I have a huge edgelist named Reed98.edgelist
. 我有一个名为
Reed98.edgelist
的巨大Reed98.edgelist
。 I'm using networkx to read and plot it as graph. 我正在使用networkx读取并将其绘制为图形。 This error appears:
出现此错误:
C:\Python26\lib\site-packages\networkx-1.7-py2.6.egg\networkx\drawing\layout.py:369: DeprecationWarning: functions overriding warnings.showwarning() must support the 'line' argument
pos+=(displacement*t/length).T
C:\Python26\lib\site-packages\networkx-1.7-py2.6.egg\networkx\drawing\layout.py:514: DeprecationWarning: functions overriding warnings.showwarning() must support the 'line' argument
pos[:,i]*=scale/lim
My code: 我的代码:
import networkx as nx
import pylab as plt
G=nx.read_edgelist('Reed98.edgelist')
nx.draw(G)
plt.show()
With a sample edgelist like: 使用样本边缘列表如:
0 2
0 3
0 5
0 9
0 602
0 11
1 443
1 445
1 456
1 463
1 478
2 134
2 136
2 9
2 10
.......
.......
These must be something else wrong with the file "Reed98.edgelist", or with the installation of networkx
. 这些必须是文件“Reed98.edgelist”或安装
networkx
其他错误。 I would verify that simple graphs work as intended first. 我会先验证简单的图表是否按预期工作。 When I try your exactly as above with your sample dataset, I get a working graph:
当我完全按照上面的示例数据集进行测试时,我会得到一个工作图:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.