logo

Graph (Network) Visualization and Analysis Program Gephi 📂Graph Theory

Graph (Network) Visualization and Analysis Program Gephi

Introduction

Gephi is an open-source, free program designed for graph (network) analysis, with a particular strength in visualization. It supports Windows, Mac, and Linux.

Basic Usage

Let’s create a graph using NetworkX and save it as a gexf file.

>>> import networkx as nx
>>> G = nx.gnm_random_graph(100,200)
>>> nx.info(G)
'Graph with 100 nodes and 200 edges'
>>> nx.write_gexf(G, 'graph.gexf')

Figure1.png

When you select a gexf file, information about the graph appears briefly. Pressing OK visualizes the graph as follows.

Figure2.png

The default graph is ugly, so by applying different colors and sizes to the nodes according to their degree in the nodes’ color, size tabs, and using the Yifan Hu layout, it appears as follows.

Figure3.png

Also, on the right Statistics tab, you can calculate the average degree, diameter, modularity, etc.

Figure4.png

Environment

  • OS: Windows11
  • Version: Python 3.9.2, networkx 2.8.6, Gephi 0.9.7