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