I have edge information organised in a way that shows the edge's location within a regular-type Graph; where a regular graph is defined as one that looks like a "checker-board". Here is an example of how the data is organised:
(7, 3) (6, 3) 1.0
(7, 3) (8, 3) 1.0
(7, 3) (8, 2) 1.41421356237
(7, 3) (6, 4) 1.41421356237
(7, 3) (7, 4) 1.0
(7, 3) (6, 2) 1.41421356237
(7, 3) (7, 2) 1.0
(7, 3) (8, 4) 1.41421356237
Here, column 1 represents the first point's location (e.g. 7 columns over and 3 rows down for the very first point), column 2 represents the adjacent point, and column 3 represents edge weight value between the two points. The provided example shows all possible adjacent paths (including diagonals) for the point at location (7,3).
My code to create a graph with these edges looks as such:
import networkx as nx
edgelist = r'C:\filepath'
edges = nx.read_weighted_edgelist(edgelist, create_using= nx.Graph(), nodetype= int)
nx.draw_networkx(edges)
I am not getting an error but I am only receiving an empty output. Any thoughts on how to correct this? I am using Python 27. Thanks!