Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python library package or interactive tool for networkX interactive visualization

I was wondering what interactive visualization library/package in python could be use with NetworkX to draw an interactive graph.

The graph would be able to display on GWT.

If there is good ones , pls feel free to suggest :) Thank you in advance!

like image 889
Peter Avatar asked Jul 15 '13 09:07

Peter


Video Answer


1 Answers

Check out the Force example in NetworkX documentation:

http://networkx.github.io/documentation/latest/examples/javascript/force.html

The force example exports a NetworkX graph into JSON and further displays it in browser via D3.js library.

Note that you are actually dealing with two problems here. The firstly problem is how you serialize the graph into a readable format, like JSON. NetworkX should provide you with this. The second problem is how you can display the serialized graph. For this task, you need an additional library, like D3.js.

The cool thing here is that NetworkX does not enforce you to use any specific library. Besides D3.js, you might want to check out the following libraries:

  • gexf-js (https://github.com/raphv/gexf-js)
  • sigma.js (http://sigmajs.org/examples/gexf_example.html)
  • arbor.js (http://arborjs.org/)

I know you have pressure to choose Jung for the display part. My advice: don't do that. For the background processing and layout part, you might be fine, but all the browser components in Jung require browsers to have a Java applet plugin. Which don't work on any mobile browser. Or tablet. AT ALL. Heck, the very second you choose to use Java applets you are guaranteed to pollute your app with security dialogs that will evict all sane users from using your application in the first place.

like image 197
jsalonen Avatar answered Nov 03 '22 07:11

jsalonen