Network (network)

Orange network classes are derived from NetworkX basic graph types and Orange.network.BaseGraph. They provide data structures and methods for storing graphs, network analysis and layout optimization.

There are four graph types: Orange.network.Graph, Orange.network.DiGraph, Orange.network.MultiGraph and Orange.network.MultiDiGraph. The choice of graph class depends on the structure of the graph you want to represent.

Examples

Reading and writing a network

This example demonstrates reading a network. Network class can read or write Pajek (.net) or GML file format.

network-read-nx.py:

# read network from file
net = Orange.network.Network.read("K5.net")

Visualize a network in NetExplorer widget

This example demonstrates how to display a network in NetExplorer.

part of network-widget.py

net = Orange.network.Network.read('musicians.net')
net.items = Orange.data.Table('musicians_items.tab')

ow = OWNetExplorer.OWNetExplorer()
ow.setGraph(net)

ow.show()
../_images/network-explorer.png