Book Image

Gephi Cookbook

Book Image

Gephi Cookbook

Overview of this book

Table of Contents (18 chapters)
Gephi Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Finding out the shortest path in the graph


Finding the shortest path in a graph is one of the problems that is widely encountered in many different situations across many different domains. This is one of the fundamental problems in graph theory. It has applications in domains such as computer networks, inventory optimization, flow networks, and so on. In this recipe, we will learn how to compute and visualize the shortest path in a graph in Gephi.

Getting ready

Load a pre-existing network in which you would like to find the shortest path, such as Les Misérables, or create one.

How to do it…

To compute and visualize the shortest path for a pair of nodes in a network, follow these steps:

  1. Click on the button with an airplane symbol on it in the vertically placed left-hand side toolbar in the Graph panel. When placed over this button, the mouse pointer displays a descriptor textbox that reads Shortest Path.

  2. Now click on the source node in the graph from where the path should start.

  3. Select the target...