Multilayer network visualisation - highlight connected nodes


I want to visualise multilayer network graph with some interactivity (zoom, hovering and selecting nodes).

I want to have one plot for each layer in bokeh. But is it somehow possible to connect nodes across plots? I would like to highlight (i.e. to change color) all nodes that are connected to some hoover/selected node in the same layer and also in the other layers. In other words, is it possible for some node to respond to some event in another plot? Or do you have any other idea how to solve it?

I’m new in bokeh, so I’m sorry if my question is offtopic.

Thank you for your answers,

You can! I’ve done similar with two plots-- in my example there was a scatterplot on the left, and choosing a dot changed the data source on the right.

You would need a TapTool (docs here, a simple tester example here) on your first graph, and a callback. Depending upon your needs, this could be in Bokeh Server with a python callback function, or a standalone Bokeh script with a Javascript callback function.

When the user selects a node, it would activate the callback, and in that callback you can make any changes needed to the data sources for the other plots (or filter the existing data source[s] in some way).

So yes, what you describe sounds possible; if you’d like to give it a try and start building out a minimal example, let us know if you have any questions as you go!

1 Like