comparison toolboxes/graph_visualisation/graphViz4Matlab/layouts/Radiallayout.m @ 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 classdef Radiallayout < Gvizlayout
2 % A layout that also uses graphviz but calls twopi instead of neato to
3 % to display the graph like a tree.
4 %
5 % Matthew Dunham
6 % University of British Columbia
7 % http://www.cs.ubc.ca/~mdunham/
8 methods
9 function obj = Radiallayout(name)
10 if(nargin < 1)
11 obj.name = 'Radiallayout';
12 else
13 obj.name = name;
14 end
15 load glicons;
16 obj.image = icons.radial;
17 obj.shortDescription = 'Radial Layout (GraphViz)';
18 end
19
20 function available = isavailable(obj)
21 % Make sure graphViz is available.
22 available = Gvizlayout.queryGviz('twopi');
23 if(not(available))
24 fprintf('Please install or upgrade graphViz\n');
25 end
26 end
27
28 end
29
30 methods(Access = 'protected')
31
32 function callGraphViz(obj)
33 % Call GraphViz to determine an optimal layout. Write this layout in
34 % layout.dot for later parsing.
35 err = system(['twopi -Tdot -Gmaxiter=5000 -Gstart=7 -o ',obj.layoutFile,' ',obj.adjFile]);
36 if(err),error('Sorry, unknown GraphViz failure, try another layout'); end
37 end
38
39
40
41 end
42
43 end