I would like to draw the following graph using networkx with random edge weights.
The point is that at least 3 edges have to go from nodes 2 and 3 to node 1.
I followed the code from here and got the following:
G = nx.DiGraph()
edge_list = [(1,2,{'w':'A1'}),(2,1,{'w':'A2'}), (2, 1, {'w':'A3'}), (1,3,{'w':'B'}),(3,1,{'w':'C'})]
G.add_edges_from(edge_list)
pos=nx.spring_layout(G,seed=5)
fig, ax = plt.subplots()
nx.draw_networkx_nodes(G, pos, ax=ax)
nx.draw_networkx_labels(G, pos, ax=ax)
curved_edges = [edge for edge in G.edges() if reversed(edge) in G.edges()]
straight_edges = list(set(G.edges()) - set(curved_edges))
nx.draw_networkx_edges(G, pos, ax=ax, edgelist=straight_edges)
arc_rad = 0.25
nx.draw_networkx_edges(G, pos, ax=ax, edgelist=curved_edges, connectionstyle=f'arc3, rad = {arc_rad}')
The first issue is that all the edges have to be undirected or at least bidirectional. Secondly, I added one more edge from 1 to 2 but it does not show up in the final graph.
How do I fix these two issues?