I am attempting to use python and networkx to draw a graph that has multiple edges between nodes. I am able to create the graph object using networkx.MultiGraph object
To be clear, my problem here is that when networkx draws the visualized graphs, only one edge appears between nodes that have 2 edges.
From my output below, there are multiple edges shown between A,B and C,D. However, my graphs don't show the multiple edges.
Is creating a plot that shows the multiple edges possible? From scouring the internets and from my testing, I can't find a way, but it seems like there should be.
Thanks!
G = nx.MultiGraph()
G.add_nodes_from(nodes)
G.add_edges_from(edges)
nx.draw(G, with_labels=True) #with_labels=True shows the node names on the graph
plt.show()
>>> G.nodes()
['A', 'C', 'B', 'E', 'D', 'F']
>>> G.edges()
[('A', 'C'), ('A', 'B'), ('A', 'B'), ('A', 'D'), ('C', 'D'), ('C', 'D'), ('B', 'E'), ('B', 'D'), ('E', 'D'), ('D', 'F')]
>>>