Drawing multiple edges between two nodes with networkx
An improvement to the reply above is adding the connectionstyle to nx.draw, this allows to see two parallel lines in the plot: import networkx as nx import matplotlib.pyplot as plt G = nx.DiGraph() #or G = nx.MultiDiGraph() G.add_node(‘A’) G.add_node(‘B’) G.add_edge(‘A’, ‘B’, length = 2) G.add_edge(‘B’, ‘A’, length = 3) pos = nx.spring_layout(G) nx.draw(G, pos, with_labels=True, … Read more