Visualizing graph structures in matlab
We discuss some methods for visualizing graphs/ networks, including automatic
layout of the nodes.
We assume the graph is represented as an adjacency matrix.
If using BNT, you can access the DAG using
G = bnet.dag;
Matlab's biograph function
The Mathworks computational biology toolbox
has many useful graph related functions, including visualization.
for a demo.
You can visualize an arbitrary graph (such as one learned using the
structure learning routines) with Matlab code written by
Ali Taylan Cemgil
from the University of Cambridge.
A modified version of this code
(this is already bundled with BNT).
For example, this is the output produced on a
random QMR-like model:
is an excellent, free Windows program for graph layout.
Use adj2pajek2.m to convert a graph to the
Pajek file format.
Then Choose File->Network->Read from the menu.
open-source graph visualization package from AT&T.
to convert an adjacency matrix to
the AT&T file format (the "dot" format).
You then use dot to convert it to postscript:
graph_to_dot(G, 'filename', 'foo.dot');
dot -Tps foo.dot -o foo.ps
ghostview foo.ps &