question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Multiple edges between same nodes not shown

See original GitHub issue

For a graph with edges A,B, weight=15 B,A, weight=10

Only the first edge object is retained in the add_edges(self, edges, directed=False) method, which is wrong behaviour.

This add_edges method is used in add_graph_from_networkx method, which leads to deletion of certain edges from networkx graph.

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:20 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
MridulScommented, Aug 19, 2020

Initial work on support for multiple edges https://github.com/QuantStack/ipycytoscape/pull/146

1reaction
MridulScommented, Jul 18, 2020

IMO it should be 3, and that’s why I raised the idea of having a clear graph method whenever add_graph_from_networkx is called. This is an API design decision if add_graph_from_networkx is supposed to be used successively or not, I feel we should relegate the graph manipulation to functions like add_node, add_edge, we shouldn’t use add_graph_from_networkx to manipulate the graph object. But again this is just my opinion so ¯\(ツ)

Figure 1 becomes a MultiGraph it’s not a Graph anymore, Figure 2 is what is happening right now.

And currently the way code is structured, ipycytoscape doesn’t support MultiGraphs, only Graph and Directed Graphs, we should definitely add support for MultiGraphs too, and be more explicit about it.

NOTE: I use the terms MultiGraph and Graph the way NetworkX defines it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] EdgeDepthFirstSearchAlgorithm does not find multiple ...
For this graph we would like to know all possible paths between two nodes. So for the example below the resulting paths between...
Read more >
Only one edge is going to be visualized if two nodes have ...
I think original bug – need for multiple edges is specific and unambiguous. Multiple connections between same two nodes should be visualized ...
Read more >
GraphViz, grouping multiple edges between the same nodes ...
GraphViz, grouping multiple edges between the same nodes but with different labels. Save this question. Show activity on this post. This will create...
Read more >
Label multiple edges between same vertices
Update 3: Styling and labeling edges individually can now be more conveniently done using new-in-version-12.1 function EdgeTaggedGraph :
Read more >
Multiple edges with the same source and destination appear ...
Currently, GSQL does not support multiple edge instances that share the same pair of source and target vertex pair.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found