Search code examples
python-3.xnetworkxbipartitedigraphs

How to show k-partite graph in NetworkX?


I am currently looking for a solution to create a k-partite graph with Networkx. I have already implemented the bipartite graph and the image is attachedenter image description here

As one can see due to connection among nodes in my first set Bipartite is not a good solution. Therefore I need to create a k-partite graph. As I need to show the levels of hierarchy among the nodes, therefore, I can't use other network layouts. Any help would be much appreciated.


Solution

  • I found a solution to this question from another stack overflow another post.

    Basically it says to add each node-set iteratively. Here is my output k-partite graph

    enter image description here