A nice layout is achieved by the specialized tree algorithm with a tree factor of 0.9 (see Figure 23).
If an orthogonal layout is needed, the attribute smanhattan_edges can be used. For trees, this attribute is more appropriate than the standard Manhattan layout with manhattan_edges (see Figure 24).
Example 11: Syntax Tree
<>01 >graph: {
<>02 > title: "Typed Syntax Tree"
<>03 > node:
{ title:"503160" label: "Identifier\ntst3 (0)" }
<>04 > node:
{ title:"503240" label: "Identifier\nx (0)" }
<>05 > node:
{ title:"502952" label: "INTEGER" }
<>06 > node:
{ title:"503304" label: "VarDecl" }
<> > ...
<>29 > node:
{ title:"T0" label: "no type" }
<>30 > node:
{ title:"T1" label: "no type" }
<>31 > node:
{ title:"T2" label: "int" }
<> > ...
<>57 > edge: { source:"503304" target:"503240" }
<>58 > edge: { source:"503304" target:"502952" }
<> > ...
<>83 > nearedge: { source:"503160" target:"T0" linestyle: dotted }
<>84 > nearedge: { source:"503240" target:"T1" linestyle: dotted }
<>85 > nearedge: { source:"502952" target:"T2" linestyle: dotted }
<> > ...
<>110 >}