I am fairly new to Python and need some help please.
I have a the edges for a network graph as a tuple in python:
edges = [(198704060004, 198704060010), (201501250041, 201501250045), (198608190006, 198608190007)]
and I am trying to plot a network graph. The code below only plots the first tuple pair.
import networkx as nx
g= nx.Graph()
g.add_edge(edges[0][0], edges[0][1])
nx.draw(g)
plt.show()
Can you please help me to make it automatically add all the edges. I tried writing a for loop but it seems I am writhing something wrong.
Many thanks!