| Bioinformatics Toolbox | ![]() |
Calculate node positions and edge trajectories
dolayout(BGobj, 'Propertyname', Propertyvalue...)
dolayout(..., 'OnlyPaths', OnlyPathsValue)
BGobj | Biograph object. |
OnlyPaths | Property to control the calculation of node position and edge paths. Enter 'true' to calculate only the edge paths. |
dolayout(BGobj, 'Propertyname', Propertyvalue...) calls the layout engine to calculate the optimal position for each node so that its 2–D rendering is clean and uncluttered, and then calculates the best curves to represent the edges. The following biograph object properties interact with the layout engine:
LayoutType — Selects the layout engine as 'hierarchical', 'equilibrium', or 'radial'.
LayoutScale — Rescales the sizes of the node before calling the layout engine. This gives more space to the layout and reduces the overlapping of nodes.
NodeAutoSize — When NodeAutoSize is 'on', the layout engine uses the node properties FontSize, Shape, and LayoutScale to precalculate the actual size of every node. When NodeAutoSize is 'off', the layout engine uses the node property Size.
dolayout(..., 'OnlyPaths', OnlyPathsValue), when OnlyPaths is 'true', leaves the nodes at their current positions and calculates new curves for the edges.
Create a biograph object.
cm = [0 1 1 0 0;1 0 0 1 1;1 0 0 0 0;0 0 0 0 1;1 0 1 0 0]; bg = biograph(cm) bg.nodes(1).Position
Nodes do not have a position yet.
Call the layout engine and render the graph.
dolayout(bg) bg.nodes(1).Position view(bg)
Manually modify a node position and recalculate the paths.
bg.nodes(1).Position = [150 150]; dolayout(bg, 'Onlypaths', true) view(bg)
Bioinformatics Toolbox methods for the biograph object, biograph, getancestors, getdescendants, getedgesbynodeid, getnodesbyid, getrelatives, view
MATLAB functions get, set
| dna2rna | emblread | ![]() |
© 1994-2005 The MathWorks, Inc.