Hi all I have a graph which is split in two portion, like I am showing in the photo, I would like to connect the two portion by adding a red edges like I am showing in the photo. Someone know a networkx function to do that?
Advertisement
Answer
If you do not have to calculate anything else (meaning the nodes to be connected are fixed – in the example 4 an 6) a simple
G.add_edge(4, 6)
will do. (documentation)