Interactive Graphics What to Use?

180 views
Skip to first unread message

Larry Eisenberg

unread,
May 24, 2021, 10:37:01 AM5/24/21
to networkx...@googlegroups.com
Hi,

I am looking to code up some interactive network graphics, but I am not sure which python packages to use, including whether or not I should use Networkx. The networks will most likely be Trees. The program would be acessed via a browser So far these are some of the choices that I know of:

1) Networkx with Bokeh - Melanie Walsh has sue examples

2) Networkx with pyvis

3) Dash however I was looking to use Django and I am not sure if that would work as Dash is built on a Flask framework according Jishul Wang.

4) Plotly but my impression is that this would not be an efficient choice: more code required

I appreciate any suggestions members of the group might have. Thanks.

Layne Sadler

unread,
May 24, 2021, 10:52:59 AM5/24/21
to networkx...@googlegroups.com
One tool not mentioned in the NetworkX drawing docs is Vis.js networks, which are interactive with support for custom events. JS is nice because JQuery is meant for customizing mouse/browser-based interactions.

Some notes from previous surveys of other tools: Plotly does not allow you to hover over lines drawn between points, which makes visualizing edges a challenge.  Dash can be embedded in Django: https://pypi.org/project/django-plotly-dash/ . Dash and Plotly are one and the same. Similar to R Shiny and ggplot2. Neo4j's neoviz is not supported because they want to monetize bloom.

--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/networkx-discuss/466BF5D2-96A0-4B3B-9C45-AC084F35A63C%40gmail.com.

Ross Barnowski

unread,
May 24, 2021, 11:47:06 AM5/24/21
to networkx...@googlegroups.com
I don't have much experience with browser visualization, so I can't comment on the relative merits of the approaches discussed above.

I did however want to call attention to the javascript plotting example in the gallery, which demonstrates using NetworkX + D3.js for visualization. At the very least that example will hopefully give you an idea of whether that particular approach would meet your needs.

Chris Myers

unread,
May 24, 2021, 5:42:12 PM5/24/21
to networkx...@googlegroups.com
I have not done anything integrating networkx with bokeh, but I have done some other things with bokeh.  Depending on what type of interactivity you are looking for, you might be interested in bokeh's capabilities to run a server rather than just a static (but interactive) html page, by which you can write Python callbacks to manipulate or display different data based upon user interactions.  Running a bokeh server is described at https://docs.bokeh.org/en/2.3.2/docs/user_guide/server.html and can support running an application either locally in the browser (via localhost) or as a full-fledged web app.

Chris


Larry Eisenberg

unread,
May 25, 2021, 3:31:00 PM5/25/21
to networkx-discuss

Many thanks Layne, Ross and Chris.   I very much appreciate your comments.   I guess I have some work to do.  If I find out anything that may be of interest I will let you know.
Reply all
Reply to author
Forward
0 new messages