I am trying to visualize a graph using ipycytoscape and I got so far:
import networkx as nx
import ipycytoscape
G2 = nx.Graph()
G2.add_nodes_from([*'ABCDE'])
G2.add_edges_from([('A','B'),('B','C'),('D','E'),('F','A'),('C','A')])
mynodes= G2.nodes
myedges= G2.edges
nodes = [{"data":{"id":n}} for n in mynodes]
edges = [{"data":{"source":n0,"target":n1}} for n0,n1 in myedges]
JSON_graph_data = {"nodes":nodes,"edges":edges}
cytoscapeobj = ipycytoscape.CytoscapeWidget()
cytoscapeobj.graph.add_graph_from_json(JSON_graph_data)
cytoscapeobj
It works so far. G2 is a very small Graph for training purposes
But what could be the reason that when I passed a bigger one (40 nodes, several hundreds of edges) I dont get an error but I dont see anything coming out.
This seems like a bug. Sorry I missed your question, I'll be more activate on stackoverflow from now on. If you're still interested please open an issue on: https://github.com/QuantStack/ipycytoscape/ Or join the chat: https://gitter.im/QuantStack/Lobby I'll be happy to help! Maybe the error won't even be reproducible anymore since we're moving kind of fast with the API.