-
Notifications
You must be signed in to change notification settings - Fork 21
Layouts
Here are some of the various layouts possible with graphViz4Matlab.
{{{GraphViz4Matlab}}} currently supports 8 different layouts, affecting the automated placement of the nodes. These can be changed by selecting the appropriate button in the display window, or programmatically, either at creation time or after the fact.
When creating a graphViz4Matlab object, you can specify a layout, (here a tree layout) as follows: adj = rand(5) > 0.5; % random 5x5 adjacency matrix graphViz4Matlab('-adjMat', adj, '-layout', Treelayout)
By default, a 'minimum energy' layout is used, (the default graphViz layout).
To programmatically change the layout after creation, use the setLayout method as follows:
adj = rand(5) > 0.5; % random 5x5 adjacency matrix
g = graphViz4Matlab(adj)
g.setLayout(Radiallayout)
Of the following, all require graphViz except the last 3: Circlelayout, Gridlayout, Randlayout.
Gvizlayout
Treelayout
Radiallayout
Circularlayout
Springlayout
Circlelayout
Gridlayout
Randlayout