Partitioning the graph based on node attributes
In this recipe, we will learn how to partition the graph based on node attributes, which can be selected from the readily available Gephi GUI, and then assign the desired colors to the nodes to clearly visualize these partitions.
Getting ready
To get started, load the Les Misérables network in Gephi.
How to do it…
The following steps describe the process of partitioning the Les Misérables network, based on modularity class and then assigning colors to the nodes of each of the partitions, accordingly. The process remains the same for any other graph as well.
- With the Les Misérables graph open in Gephi, click on the Nodes tab under the Partition panel, which is located on the upper-left side of the Gephi window.
- Click on the refresh button with two encircling green arrows, which is located just below the Nodes tab marker.
- This populates the drop-down menu with a list of available partitioning parameters:
- From the drop-down menu...