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