02.10.2012 Views

5 Graph Description Language (GDL) - Absint

5 Graph Description Language (GDL) - Absint

5 Graph Description Language (GDL) - Absint

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.6 Examples of <strong>GDL</strong> Specifications<br />

5.6.1 A Cyclic <strong>Graph</strong><br />

These examples show a number of small cyclic graphs without any labels but with different edge<br />

types. The titles are displayed in the nodes. The last example in this sequence shows how the<br />

anchor edge attribute is used.<br />

The layout of the following three example specifications are shown in Figure 13.<br />

Example 1: Ordinary Edges<br />

aiSee tries to give all edges the same orientation. But since the graph is cyclic, one edge has to be<br />

reverted (edge D–>A).<br />

01 graph: {<br />

02 // list of nodes<br />

03 node: { title: "A" }<br />

04 node: { title: "B" }<br />

05 node: { title: "C" }<br />

06 note: { title: "D" }<br />

07 node: { title: "E" }<br />

08 // list of edges<br />

09 edge: { source: "A" target: "B" }<br />

10 edge: { source: "A" target: "C" }<br />

11 edge: { source: "C" target: "D" }<br />

12 edge: { source: "D" target: "E" }<br />

13 edge: { source: "D" target: "A" }<br />

14 }<br />

Example 2: Back Edge<br />

The edge to be reverted can be specified as a back edge.<br />

11 backedge: { thickness: 3 source: "C" target: "D" }<br />

Example 3: Near Edges<br />

Near edges can be used to express a close relationship between two nodes and to place nodes rightor<br />

left-neighbored.<br />

09 nearedge: { source: "A" target: "B" }<br />

10 nearedge: { source: "A" target: "C" }<br />

12 nearedge: { source: "D" target: "E" }<br />

The layout of the following three example specifications are shown in Figure 14.<br />

Example 4: Bent Near Edge<br />

In some situations, edges are to be horizontally anchored, like near edges, yet the target node is<br />

not to be at the same level. These edges have to have a bend point. This is why bent near edges are<br />

used.<br />

09 bentnearedge: { source: "A" target: "B" }<br />

47

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!