Reference: |
Linux /
Graphviz
dot -Tpng example.dot -o example.png to create png file. Or create ps file and then with ps2pdf a pdf file.
description of the graph digraph G {
father -> son;
father -> daughter;
}
or with label: father [shape=box,style=filled, color=red,label="dad"] -> son [style=bold, label="junior",color=blue] For nodes which are partially devided we need type record. node [shape=record] then we can use: employee [label="{emp|+money:int\l+name:string\l | + word(): void\l}" ]
\l is for left positioned text
{ | } for horizontal dashs
to describe both ends of an edge use head- and taillabel: edge [headlabel="1",taillabel="1..*" For not directed edges we can use tool "neato" instead of dot and code: graph G {
A -- B
}
|