AbsInt

/*

Graph Layout Algorithms: Source Code

Other sources Download all sources Gallery Sitemap home

aiSee offers 15 basic layout algorithms, including a specialized version for trees.
Here is a small demonstration. Switching between layout algorithms is done as follows:
1. When aiSee is running, type "l", followed by right-clicking
2. Select an algorithm and click on OK.
You can also change the first line of the source file using a text editor, and then reload (type "g").



graph:{title: "graph layout algorithms"
       layoutalgorithm: minindegree

node: {title: "St"  label: "Start of All"}
node: {title: "01"}  node: {title: "02"}
node: {title: "03"}  node: {title: "04"}
node: {title: "05"}  node: {title: "06"}
node: {title: "07"}  node: {title: "08"}
node: {title: "09"}  node: {title: "10"}

edge: {source:"St" target:"01"}
edge: {source:"St" target:"02"}
edge: {source:"St" target:"03"}
edge: {source:"St" target:"04"}
edge: {source:"St" target:"05"}
edge: {source:"St" target:"06"}
edge: {source:"St" target:"09"}
edge: {source:"01" target:"03"}
edge: {source:"02" target:"04"}
edge: {source:"03" target:"05"}
edge: {source:"06" target:"07"}
edge: {source:"07" target:"08"}
edge: {source:"08" target:"St"}
edge: {source:"05" target:"10"}
edge: {source:"09" target:"10"}
}
This code visualized by aiSee
Layout computed by aiSee


GDL offers a vast collection of specifications enabling
even such a simple graph to be more illustrative.

 */

graph: {title: "graph layout algorithms"
        layoutalgorithm :  minindegree
        finetuning      :  yes
             scaling    :   2.0
             yspace     :  50       //=================================
        node.textcolor  :   0       //  aiSee -- Graph Visualization   
        node.borderwidth:   0       //      © Copyright 2000-2001      
        node.fontname   : "helvB18" //AbsInt Angewandte Informatik GmbH
        node.shape      :  circle   //      http://www.aisee.com       
        node.width      :  30       //        aisee@absint.com         
        node.height     :  30       //=================================
        edge.arrowsize  :   8
        edge.color      :  43
             arrowmode  :  free
             splines    :  yes
        port_sharing    :  no

        colorentry 1    :   0   0 120    colorentry 7  : 160  51 170
        colorentry 2    : 255   0   0    colorentry 8  :  32  42 219
        colorentry 3    : 232 126  27    colorentry 9  : 229  45 113
        colorentry 4    :  41 199 216    colorentry 10 :  39 229  99
        colorentry 5    :  48 155 155    colorentry 42 : 186   7   7
        colorentry 6    :  55 142  51    colorentry 43 : 100   0   0

node: { title           : "S"
        label           : "Start"
        color           :  42
        width           : 100
        shape           :  box
        borderwidth     :   5
        borderstyle     :  dotted
        bordercolor     :  42}

node: {title: "1"  color: 1}   node: {title: "6"  color:  6}
node: {title: "2"  color: 2}   node: {title: "7"  color:  7}
node: {title: "3"  color: 3}   node: {title: "8"  color:  8}
node: {title: "4"  color: 4}   node: {title: "9"  color:  9}
node: {title: "5"  color: 5}   node: {title: "0"  color: 10}

edge: {source: "S"  target: "1"}
edge: {source: "S"  target: "2"}
edge: {source: "S"  target: "3"}
edge: {source: "S"  target: "4"}
edge: {source: "S"  target: "5"}
edge: {source: "S"  target: "6"}
edge: {source: "S"  target: "9"}

edge: {source: "1"  target: "3"  color: 1}
edge: {source: "2"  target: "4"  color: 2}
edge: {source: "3"  target: "5"  color: 3}
edge: {source: "6"  target: "7"  color: 6}
edge: {source: "7"  target: "8"  color: 7}
edge: {source: "8"  target: "S"  color: 8}
edge: {source: "5"  target: "0"  color: 5}
edge: {source: "9"  target: "0"  color: 9}
}
/*
This code visualized by aiSee
Layout computed by aiSee

aiSee layout dialog box
The layout dialog box

 

Normal Layout Maxdepth Layout Minbackward Layout

Normal

Maxdepth

Minbackward

Maxdepthslow Layout Mindegree Layout Minoutdegree Layout

Maxdepthslow

Mindegree

Minoutdegree

Mindepthslow Layout Force-Directed Layout Maxindegree Layout

Mindepthslow

Forcedir

Maxindegree


An easy way to get this code:
1. In the 'Edit' menu of the browser, click on 'Select All'.
2. Paste this page into a text editor and save.
If the browser supports this feature, any text not belonging
to the source code will be ignored by aiSee.

top Sitemap home


Please send any suggestions, comments or questions to webmaster@absint.com or use our feedback page.
Content and Web design © copyright 1998-2001 by AbsInt Angewandte Informatik GmbH.
Last modified on 17 October 2001. URL: http://www.absint.com/aisee/gdl/layout.htm*/