annotate toolboxes/graph_visualisation/graphViz4Matlab/layouts/Circularlayout.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
rev   line source
wolffd@0 1 classdef Circularlayout < Gvizlayout
wolffd@0 2 % A layout that also uses graphviz but calls twopi instead of neato to
wolffd@0 3 % to display the graph like a tree.
wolffd@0 4 %
wolffd@0 5 % Matthew Dunham
wolffd@0 6 % University of British Columbia
wolffd@0 7 % http://www.cs.ubc.ca/~mdunham/
wolffd@0 8 methods
wolffd@0 9 function obj = Circularlayout(name)
wolffd@0 10 if(nargin < 1)
wolffd@0 11 obj.name = 'circularlayout';
wolffd@0 12 else
wolffd@0 13 obj.name = name;
wolffd@0 14 end
wolffd@0 15 load glicons;
wolffd@0 16 obj.image = icons.circular;
wolffd@0 17 obj.shortDescription = 'Circular Layout (GraphViz)';
wolffd@0 18 end
wolffd@0 19
wolffd@0 20 end
wolffd@0 21
wolffd@0 22 methods(Access = 'protected')
wolffd@0 23
wolffd@0 24 function callGraphViz(obj)
wolffd@0 25 % Call GraphViz to determine an optimal layout. Write this layout in
wolffd@0 26 % layout.dot for later parsing.
wolffd@0 27 err = system(['circo -Tdot -Gmaxiter=5000 -Gstart=7 -o ',obj.layoutFile,' ',obj.adjFile]);
wolffd@0 28 if(err),error('Sorry, unknown GraphViz failure, try another layout'); end
wolffd@0 29 end
wolffd@0 30
wolffd@0 31 end
wolffd@0 32
wolffd@0 33 end