Reading a Pajek Dataset into Networkx -
I want to convert a Pajec dataset to a network x Thanks for using the position of the nodes (ranging from 0-14). Network packaged file reader with additional "partitioning." The data in it seems unfortunately that this work But obviously you are achieving extra nodes and edges. If you remove everything in the file, then * when you start with the edges, you can read it with the network. Read_pajek (). Graph () . Dataset comes from Costa Rican, I'm using a very easy
network x.read_pajek (path name) function, but I am running in some trouble. After changing the following instructions on my terminal window (iPython) to the correct directory, importing
Network Xparex NX and
as matplotlib.pyplot plt :
& gt; & Gt; G = nx.read_pajek ( 'SanjuuanSur.paj') & gt; & Gt; Nx.draw (g)> & gt; Fig = plt.figure (fig = (15, 10)) gt; & Gt; nx.draw (g)> & gt; Plt.show ()
< P> Something is going abnormal - obviously, and hoping that an experienced person might be able to help me find that many different parts in the
.paj file Downloaded in a file is not really sure how to break it, because there is no comment and in general Pajak looks like it is a GUI Works with
& gt; & Gt; G Node ['F 49'] {'ID': '49', 'Size': '0.5000', 'x': 0.5533, 'y': 0.3766}
Comments
Post a Comment