使用plotly包在python中读取GML文件不起作用。我怎么处理这个?

时间:2016-10-05 18:55:38

标签: python anaconda igraph plotly gml

我的代码:

import igraph as ig

G=ig.Graph.Read_GML('netscience.gml.txt')
labels=list(G.vs['label'])
N=len(labels)
E=[e.tuple for e in G.es]# list of edges
layt=G.layout('kk') #kamada-kawai layout
type(layt)

错误讯息:

Traceback (most recent call last):File "C:/Users/Soonhyeon/PycharmProjects/Stock/vz1.py", line 3, in <module> G=ig.Graph.Read_GML('netscience.gml.txt')
IOError: [Errno 2] No such file or directory: 'netscience.gml.txt'

我该如何处理此错误?我已经找到了一个GML文件,其中包含了netscience.gml&#39;在网络上,但我无法找到解决方案。是关于igraph包的错误?还是情节包?

请帮助,我已经研究了情节包here

enter image description here

0 个答案:

没有答案