aiSee for Unix: User Manual<>index

Tree layout

The following example shows a typed syntax tree. This tree can either be drawn by the specialized algorithm for "downward laid-out trees" or by the normal algorithms. When the normal algorithms are used to draw a tree, it is advisable to increase the layout down factor in order to obtain good results (see Figure 1). If the layout down factor is not used, the incoming edges draw the nodes too much in the direction of the parent node.

A nice layout is achieved by the specialized tree algorithm with a tree factor of 0.9 (see Figure 2).

If an orthogonal layout is needed, the attribute smanhattan_edges can be used (see Figure 3). For trees, this attribute is more appropriate than the standard Manhattan layout with manhattan_edges.

graph: {title: "Typed Syntax Tree"
        //...
node: { title:"Identifier\ntst3 (0)" }
node: { title:"Identifier\nx (0)" }
node: { title:"INTEGER" }
node: { title:"VarDecl" }
        // ...
node: { title:"no type" }
node: { title:"int" }
        // ...
nearedge: { source:"Identifier\ntst3 (0)"
            target:"int" }
        // ...
       }
Figure 1: Normal Layout Algorithm
Figure 2: Tree Layout

Figure 3: Tree Layout, SManhattan Edges

HomeSitemapai
Last modified on 7 February 2003 by webmaster. © 2000-2003 AbsInt.
URL: http://www.aisee.com/manual/unix/41.htm


Home
About
Examples
Free trial

 Help
» FAQs
» Quick Guide
» User Manual
   » Windows
   » Mac
» GDL
» Options
» Changelog
» GDLedit

Store
Legal
Contact
Extras
Sitemap