Process-like visualization of Networkx MultiDiGraph with python

68 Views Asked by At

We use Networkx with python to capture processes as MultiDiGraphs. Each node represents an activity, the edges are directed. Back loops between nodes exist. Also multiple edges can go out / into a node.

The nodes do not have any positional for information.

I want to find a way to visualize these graphs with python. Goal is to quickly visually analyze and compare graphs. It doesn't have to be beautiful or perfectly aligned.

Important is, that there is some consistency how the graphs are visualized so that they can be easily compared.

As example, I thought of something like UML activity charts.

Thx

Here´s an example multidigraph: Nodes:

   [Start(), Act(Step 1), TransitionA(), Act(Step 2), TransitionB(), Decision1(), TransitionB(), Act(Step 3), TransitionC(), TransitionD(), End(), TransitionE()]

Edges:

[(Start(), TransitionA(), 0), (Act(Step 1), TransitionB(), 0), (TransitionA(), Act(Step 1), 0), (Act(Step 2), TransitionC(), 0), (TransitionB(), Act(Step 2), 0), (Decision(), TransitionD(), 0), (Decision(), TransitionE(), 0), (TransitionC(), Decision(), 0), (Act(Step 3), TransitionF(), 0), (TransitionE(), Act(Step 3), 0), (TransitionF(), Act(Step 2), 0), (TransitionE(), End(), 0)]

Visualization example (made with draw.io) - as said, it doesn´t have to be that structured: enter image description here I searched available visualization methods for Networkx graphs with tools like graphviz but didn't even find examples of what I'm after

0

There are 0 best solutions below