Table Of Contents

Previous topic

Orange Network Add-on Documentation

Next topic

BaseGraph

This Page

Network (network)

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

We support four graph types: Orange.network.Graph, Orange.network.DiGraph, Orange.network.MultiGraph, and Orange.network.MultiDiGraph. Choose the graph type that matches the structure of the graph you wish to represent.

Examples

Reading and Writing Networks

Network class reads and writes Pajek (.net), GML, and gpickle file formats.

network-read-nx.py:

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

Visualize Networks in Net Explorer Widget

To display a network in Net Explorer widget write:

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