Networks and Graphs

Graph based representations are widely used for analysing networks and a several tools exist for creating networks (graphs) and rendering them interactively.

networkx and ipycytoscape

The networkx package …

The ipycytoscape package …

Let’s load in the packages:

import ipycytoscape
import networkx as nx

We can create a simple graph and render it using an interactive widget:

G = nx.complete_graph(5)

undirected = ipycytoscape.CytoscapeWidget()
undirected.graph.add_graph_from_networkx(G)

undirected