You are here

GraphViz

Error message

  • Unable to create CTools CSS cache directory. Check the permissions on your files directory.
  • Unable to create CTools CSS cache directory. Check the permissions on your files directory.

Graphen visualisieren

GraphViz (Terminal)

* https://graphviz.org (executable)

Die Installation (Linux):
$ sudo apt install graphviz

Download für Windows:
* https://graphviz.org/download/

So sieht die GV-Datei (regex_3_eps_3.gv) vom Beispiel 1 aus:

digraph finite_state_machine {
rankdir=LR size="8,5"
node [shape=doublecircle]
2
4
node [shape=circle]
2 -> 3 [label=a]
2 -> 5 [label=c]
2 -> 6 [label=e]
2 -> 8 [label=g]
2 -> 11 [label=m]
3 -> 4 [label=b]
4 -> 3 [label=a,color=green]
4 -> 5 [label=c,color=green]
4 -> 6 [label=e,color=green]
4 -> 8 [label=g,color=green]
4 -> 9 [label=i]
4 -> 10 [label=k]
4 -> 11 [label=m,color=green]
5 -> 4 [label=d]
6 -> 4 [label=f]
8 -> 4 [label=h]
9 -> 4 [label=j]
10 -> 4 [label=l]
11 -> 4 [label=n]
{ rank=same; 3, 5, 6, 8, 11 }
}

* siehe auch GraphViz pocket reference: https://graphs.grevian.org/reference
* https://www.graphviz.org/doc/info/shapes.html

PNG-Grafik erstellen:
$ dot -Tpng regex_3_eps_3.gv -oregex_3_eps_3.gv.png

Weitere Einstellungen:
* https://graphviz.org/doc/info/command.html

Mit Python

Oder ein sehr einfacher Einstieg mit Python:
* https://gitlab.com/graphviz/graphviz/ (Python 3.8+)
* https://graphviz.readthedocs.io/en/stable/manual.html

Die Installation:
$ pip install graphviz

Hier sind gute Beispiele zu finden:
* https://graphviz.readthedocs.io/en/stable/examples.html

Implementierungen

* https://graphviz.org (executable)
* https://graphviz.org/resources/ (External Resources: Editor, Plugins, Graphical Interfaces, Languages, etc...)
* https://gitlab.com/graphviz/graphviz/ (Python)
* https://pear.php.net/manual/en/package.images.image-graphviz.example.php (PHP)
* https://github.com/alexandresalome/graphviz (PHP)
* https://code.google.com/archive/p/canviz/ Demo: http://www.ryandesign.com/canviz/ (JavaScript)
* https://github.com/mdaines/viz-js (JavaScript, NPM)