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

Adding and deleting edges in a graph


Apart from adding nodes to, and deleting them from, the graph, the other operation that is often carried out is the addition and deletion of edges. This recipe teaches you how to carry out this operation in Gephi.

Getting ready

An edge exists between two nodes and hence, before starting to add an edge(s), you will need to make sure that the nodes for this edge exist. So, before we move forward with the recipe, open a new project in Gephi and then, in the Data Laboratory mode, add two nodes: Node_1 and Node_2.

How to do it…

With two nodes, Node_1 and Node_2, already existing in our network, follow these steps to add a new edge between these two nodes:

  1. Click on the Edges button in the top panel.

  2. Click on the Add edge button in the top panel. This opens a new window, as shown in the following screenshot:

  3. Choose between Directed and Undirected, depending on which type of edge you want to add.

  4. Select the source node and target node.

  5. Hit Ok once this has been done...