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

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 classdef Circularlayout < Gvizlayout
Daniel@0 2 % A layout that also uses graphviz but calls twopi instead of neato to
Daniel@0 3 % to display the graph like a tree.
Daniel@0 4 %
Daniel@0 5 % Matthew Dunham
Daniel@0 6 % University of British Columbia
Daniel@0 7 % http://www.cs.ubc.ca/~mdunham/
Daniel@0 8 methods
Daniel@0 9 function obj = Circularlayout(name)
Daniel@0 10 if(nargin < 1)
Daniel@0 11 obj.name = 'circularlayout';
Daniel@0 12 else
Daniel@0 13 obj.name = name;
Daniel@0 14 end
Daniel@0 15 load glicons;
Daniel@0 16 obj.image = icons.circular;
Daniel@0 17 obj.shortDescription = 'Circular Layout (GraphViz)';
Daniel@0 18 end
Daniel@0 19
Daniel@0 20 end
Daniel@0 21
Daniel@0 22 methods(Access = 'protected')
Daniel@0 23
Daniel@0 24 function callGraphViz(obj)
Daniel@0 25 % Call GraphViz to determine an optimal layout. Write this layout in
Daniel@0 26 % layout.dot for later parsing.
Daniel@0 27 err = system(['circo -Tdot -Gmaxiter=5000 -Gstart=7 -o ',obj.layoutFile,' ',obj.adjFile]);
Daniel@0 28 if(err),error('Sorry, unknown GraphViz failure, try another layout'); end
Daniel@0 29 end
Daniel@0 30
Daniel@0 31 end
Daniel@0 32
Daniel@0 33 end