jaal
jaal copied to clipboard
JAAL not plotting graphs when a pair of nodes have more than one edge
Fantastic library you have made available Mayank..
One little problem.
If you need to plot more than one edge for a pair of nodes, the graph simply is not rendered ...
CASE A: This works A---->B A---->C
CASE B: This does not work. And it does not show any error. A<----B A---->B
I have added the directed=True option...
It does work for case A.
Case B does not work at all.
Any option that I may be missing ?
Thanks in advance
Hello Marcello,
Dont know if this will help you any more but I found the only way to get multiple links between nodes to work is to remove the doubles before you pass your edges to jaal constructor. If you turn on your browser developer tools you will see an error in the console (duplicate id)
node_df = pd.read_csv(fileNodes, sep=';', engine='python', encoding = "utf-8") edge_df = pd.read_csv(fileEdges, sep=';', engine='python')
# remove duplicates links (but I merge the labels, In my data I have nodes with different relationships) edge_noDups_df = edge_df.groupby(['from', 'to'])['label'].apply(set).apply(", ".join).reset_index()
Jaal(edge_noDups_df, node_df).plot(vis_opts={'physics':{'stabilization':{'iterations': 25}}})