I have a text file with the following data:
192.168.12.22 192.168.12.21 23
192.168.12.21 192.168.12.22 26
192.168.12.23 192.168.12.22 56
There are three nodes and two of them are sending packets to each other. I want to be able to show both weights on two different edges, but it only shows one with a single weight.
This is my code:
import networkx as nx
import matplotlib.pyplot as plt
G = nx.read_weighted_edgelist('test.txt', create_using=nx.DiGraph())
pos = nx.spring_layout(G)
print(nx.info(G))
nx.draw(G, pos, with_labels=True)
nx.draw_networkx_edge_labels(G, pos)
plt.show()