Products & Services Solutions Academia Support User Community Company

Learn more about Bioinformatics Toolbox   

dolayout (biograph) - Calculate node positions and edge trajectories

Syntax

dolayout(BGobj)

dolayout(BGobj, 'Paths', PathsOnlyValue)

Arguments

BGobjBiograph object created by the biograph function (object constructor).
PathsOnlyValueControls the calculation of only the edge paths, leaving the nodes at their current positions. Choices are true or false (default).

Description

dolayout(BGobj) 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 layout engine uses the following properties of the biograph object:

For more information on the above properties, see Properties of a Biograph Object. For information on accessing and specifying the above properties of a biograph object, see Determining Properties and Property Values of a Biograph Object and Specifying Properties of a Biograph Object.


dolayout(BGobj, 'Paths', PathsOnlyValue)
controls the calculation of only the edge paths, leaving the nodes at their current positions. Choices are true or false (default).

Examples

  1. 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)
    Biograph object with 5 nodes and 9 edges.
    bg.nodes(1).Position
    
    ans =
    
         [] 

    Nodes do not have a position yet.

  2. Call the layout engine and render the graph.

    dolayout(bg)
    bg.nodes(1).Position
    
    ans =
    
       112   224
    
    view(bg)
    
  3. Manually modify a node position and recalculate the paths only.

    bg.nodes(1).Position = [150 150];
    dolayout(bg, 'Pathsonly', true)
    view(bg)
    

See Also

Bioinformatics Toolbox function: biograph (object constructor)

Bioinformatics Toolbox object: biograph object

Bioinformatics Toolbox methods of a biograph object: dolayout, get, getancestors, getdescendants, getedgesbynodeid, getnodesbyid, getrelatives, set, view

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS