wiki:GraphvizPluginForTrac

This is an illustration of Trac's Graphviz plugin which generates graph image from text script.

Example 1

GraphViz image

This image is generated from this script:

digraph G {Hello->World->Graphviz->Rules}

Example 2

GraphViz image

(The text in the circles is clickable.) This image is generated from this script:

  digraph G {
    rankdir = "LR"
    Konca_Trac [ URL="http://trac.konca.com" ]
    Trac [ 
      URL="http://trac.edgewall.org/"   
      fontcolor=red
    ]
    Konca_Trac -> Trac
  }

Example 3

GraphViz image

This image is generated from this script:

digraph G {

        subgraph cluster_0 {
                style=filled;
                color=lightgrey;
                node [style=filled,color=white];
                a0 -> a1 -> a2 -> a3;
                label = "process #1";
        }

        subgraph cluster_1 {
                node [style=filled];
                b0 -> b1 -> b2 -> b3;
                label = "process #2";
                color=blue
        }
        start -> a0;
        start -> b0;
        a1 -> b3;
        b2 -> a3;
        a3 -> a0;
        a3 -> end;
        b3 -> end;

        start [shape=Mdiamond];
        end [shape=Msquare];
}

Example 4

Draws UML Class Diagram with Graphviz.

GraphViz image

This image is generated from this script:

digraph {
  rankdir=BT // Graph direction : Bottom-Top
  node [shape=record] // all nodes are in Box shape
  edge [dir=normal labeldistance=1] // "labeldistance=1" is default value
 
  // Multiplicity types by Crow's Foot Notation
  Member1 -> Group1 [dir=both arrowtail=crowodot arrowhead=teetee label="0or* to 1"]
  Member2 -> Group2 [dir=both arrowtail=teeodot arrowhead=teetee label="0or1 to 1"]
  Member3 -> Group3 [dir=both arrowtail=crowtee arrowhead=crowodot label="1or* to 0or*"]
}

Also see

Last modified 3 years ago Last modified on Dec 8, 2014, 2:12:24 PM