nus-mtp/sashimi-note

View on GitHub
sashimi-webapp/test/unit/specs/logic/reference/diagrams/graphvizInput.txt

Summary

Maintainability
Test Coverage
### Graphviz
```graphviz
graph { 
        a -- b; 
        b -- c; 
        a -- c; 
        d -- c; 
        e -- c; 
        e -- a; 
    } 
```

```graphviz
graph {
        a -- b;
        b -- c;
        c -- d;
        d -- e;
        e -- f;
        a -- f;
        a -- c;
        a -- d;
        a -- e;
        b -- d;
        b -- e;
        b -- f;
        c -- e;
        c -- f;
        d -- f;
    }
```

```graphviz
digraph {
        a -> b;
        b -> c;
        c -> d;
        d -> a;
    }
```

```graphviz
digraph {
        a -> b[label="0.2",weight="0.2"];
        a -> c[label="0.4",weight="0.4"];
        c -> b[label="0.6",weight="0.6"];
        c -> e[label="0.6",weight="0.6"];
        e -> e[label="0.1",weight="0.1"];
        e -> b[label="0.7",weight="0.7"];
    }
```

```graphviz
graph { 
        a -- b -- d -- c -- f[color=red,penwidth=3.0];
        b -- c; 
        d -- e; 
        e -- f; 
        a -- d; 
    }
```

```graphviz
digraph { 
        subgraph cluster_0 {
            label="Subgraph A";
            a -> b;
            b -> c;
            c -> d;
        }
        
        subgraph cluster_1 {
            label="Subgraph B";
            a -> f;
            f -> c;
        }
    }
```

```graphviz
graph { 
        splines=line; 
        subgraph cluster_0 { 
            label="Subgraph A"; 
            a; b; c
        } 
 
        subgraph cluster_1 { 
            label="Subgraph B"; 
            d; e;
        }

        a -- e; 
        a -- d; 
        b -- d; 
        b -- e; 
        c -- d; 
        c -- e; 
    }
```

```graphviz
graph {
        rankdir=LR; // Left to Right, instead of Top to Bottom
        a -- { b c d };
        b -- { c e };
        c -- { e f };
        d -- { f g };
        e -- h;
        f -- { h i j g };
        g -- k;
        h -- { o l };
        i -- { l m j };
        j -- { m n k };
        k -- { n r };
        l -- { o m };
        m -- { o p n };
        n -- { q r };
        o -- { s p };
        p -- { s t q };
        q -- { t r };
        r -- t;
        s -- z; 
        t -- z;
    }
```

```graphviz
graph { 
        rankdir=LR;
        a -- { b c d }; b -- { c e }; c -- { e f }; d -- { f g }; e -- h; 
        f -- { h i j g }; g -- k; h -- { o l }; i -- { l m j }; j -- { m n k }; 
        k -- { n r }; l -- { o m }; m -- { o p n }; n -- { q r }; 
        o -- { s p }; p -- { s t q }; q -- { t r }; r -- t; s -- z; t -- z
        { rank=same b, c, d }
        { rank=same e, f, g }
        { rank=same h, i, j, k }
        { rank=same l, m, n }
        { rank=same o, p, q, r }
        { rank=same s, t }
    }
```

```graphviz
digraph hierarchy {

                nodesep=1.0 // increases the separation between nodes
                
                node [color=Red,fontname=Courier,shape=box] //All nodes will this shape and colour
                edge [color=Blue, style=dashed] //All the lines look like this

                Headteacher->{Deputy1 Deputy2 BusinessManager}
                Deputy1->{Teacher1 Teacher2}
                BusinessManager->ITManager
                {rank=same;ITManager Teacher1 Teacher2}  // Put them on the same level
}
```