view 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
line wrap: on
line source
classdef Circularlayout < Gvizlayout
% A layout that also uses graphviz but calls twopi instead of neato to 
% to display the graph like a tree. 
%
% Matthew Dunham
% University of British Columbia 
% http://www.cs.ubc.ca/~mdunham/  
    methods
       function obj = Circularlayout(name)
            if(nargin < 1)
                obj.name = 'circularlayout';
            else
                obj.name = name;
            end
            load glicons;
            obj.image = icons.circular;
            obj.shortDescription = 'Circular Layout (GraphViz)'; 
       end
       
    end
    
    methods(Access = 'protected')
      
       function callGraphViz(obj)
       % Call GraphViz to determine an optimal layout. Write this layout in
       % layout.dot for later parsing. 
           err = system(['circo -Tdot -Gmaxiter=5000 -Gstart=7 -o ',obj.layoutFile,' ',obj.adjFile]);
           if(err),error('Sorry, unknown GraphViz failure, try another layout'); end
       end
      
    end
   
end