comparison toolboxes/FullBNT-1.0.7/docs/graphviz.html @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 <h1>Visualizing graph structures in matlab</h1>
2
3 We discuss some methods for visualizing graphs/ networks, including automatic
4 layout of the nodes.
5 We assume the graph is represented as an adjacency matrix.
6 If using BNT, you can access the DAG using
7 <pre>
8 G = bnet.dag;
9 </pre>
10
11 <h2>Matlab's biograph function</h2>
12
13 The Mathworks computational biology toolbox
14 has many useful graph related functions, including visualization.
15 <br>
16 Click
17 <a href="http://www.mathworks.com/products/bioinfo/demos.html?file=/products/demos/shipping/bioinfo/graphtheorydemo.html#4">
18 here</a>
19 for a demo.
20
21
22
23 <h2>Cemgil's draw_graph</h2>
24
25 You can visualize an arbitrary graph (such as one learned using the
26 structure learning routines) with Matlab code written by
27 <a href="http://www-sigproc.eng.cam.ac.uk/~atc27/matlab/layout.html">
28 Ali Taylan Cemgil</a>
29 from the University of Cambridge.
30 A modified version of this code
31 is <a href="GraphViz.zip">here</a>
32 (this is already bundled with BNT).
33 Just type
34 <pre>
35 draw_graph(G);
36 </pre>
37 For example, this is the output produced on a
38 <a href="http://www.cs.ubc.ca/~murphyk/Software/BNT/usage.html#qmr">random QMR-like model</a>:
39 <p>
40 <img src="Figures/qmr.rnd.jpg">
41 <p>
42
43 <h2>Pajek</h2>
44
45 <a href="http://vlado.fmf.uni-lj.si/pub/networks/pajek">Pajek</a>
46 is an excellent, free Windows program for graph layout.
47 Use <a href="adj2pajek2.m">adj2pajek2.m</a> to convert a graph to the
48 Pajek file format.
49 <br>
50 Then Choose File->Network->Read from the menu.
51
52 <h2>AT&T Graphviz</h2>
53
54 <a href="http://www.research.att.com/sw/tools/graphviz">graphhviz</a>
55 is an
56 open-source graph visualization package from AT&T.
57 Use
58 <a href="graph_to_dot.m">graph_to_dot</a>
59 to convert an adjacency matrix to
60 the AT&T file format (the "dot" format).
61 You then use dot to convert it to postscript:
62 <pre>
63 graph_to_dot(G, 'filename', 'foo.dot');
64 dot -Tps foo.dot -o foo.ps
65 ghostview foo.ps &
66 </pre>