====== Dokuwiki Plugins ====== ===== GraphViz ===== ==== Installation ==== [[http://andkorn.org/wiki/doku.php?id=howtos:computers:dokuwiki:graphviz_plugin|Installing the GraphViz Plugin]]\\ \\ Required packages: ''graphviz imagemagick ttf-freefont ttf-bitstream-vera''\\ Login to Dokuwiki under an administrative account and go to Admin -> Manage Plugins\\ Make sure ''/lib/plugins'' is writable by ''www-data''.\\ Paste [[http://danjer.doudouke.org/graphviz.zip]] into the field and download the plugin. Dokuwiki will unzip and install it for you. There is no configuration.\\ Lock down ''/lib/plugins'' after this (group, world: read-only).\\ \\ :!: **Edit page to see GraphViz DOT code**\\ \\ [[http://www.graphviz.org/doc/info/|GraphViz Reference]]\\ [[http://www.graphviz.org/Gallery.php|Examples]]\\ ==== Directed Graph ==== digraph { A->B->C; B->D; } ==== Undirected Graph ==== graph { a [label="Foo"]; b [shape=box]; a -- b -- c [color=blue]; b -- d [style=dotted]; } \\ [[http://en.wikipedia.org/wiki/DOT_language|Wikipedia article including this example]] ==== Undirected Graph with Costs ==== graph { V1 -- V2 [label="11"]; V1 -- V3 [label="22"]; V2 -- V4 [label="33"]; V3 -- V4 [label="44"]; } ==== Entity Relation Diagram ==== graph { server[shape=rectangle;label="Server"]; node[shape=ellipse]; address[label="Address"]; database[shape=diamond;label="Database"]; user[shape=rectangle;label="User"]; node[shape=ellipse]; id[label="id"]; email[label="email"]; name[label="name"]; server -- address; server -- database [label="1", len=3]; database -- user [label="n", len=2]; user -- id; user -- name; user -- email; } ==== Complex Nodes ==== [[http://www.linuxjournal.com/article/7275|Linux Journal: Introduction to GraphViz]]\\ digraph G { node [shape = record]; node0 [ label =" | J | "]; node1 [ label =" | E | "]; node4 [ label =" | C | "]; node6 [ label =" | I | "]; node2 [ label =" | U | "]; node5 [ label =" | N | "]; node9 [ label =" | Y | "]; node8 [ label =" | W | "]; node10 [ label =" | Z | "]; node7 [ label =" | A | "]; node3 [ label =" | G | "]; "node0":f0 -> "node1":f1; "node0":f2 -> "node2":f1; "node1":f0 -> "node4":f1; "node1":f2 -> "node6":f1; "node4":f0 -> "node7":f1; "node4":f2 -> "node3":f1; "node2":f0 -> "node5":f1; "node2":f2 -> "node9":f1; "node9":f0 -> "node8":f1; "node9":f2 -> "node10":f1; } digraph G { rankdir = LR; node [shape=record, width=.1, height=.1]; node0 [label = " | | | | | | ", height = 3]; node[ width=2 ]; node1 [label = "{ r0 | 123 |

}" ]; node2 [label = "{ r10 | 13 |

}" ]; node3 [label = "{ r11 | 23 |

}" ]; node4 [label = "{ r12 | 326 |

}" ]; node5 [label = "{ r13 | 1f3 |

}" ]; node6 [label = "{ r20 | 123 |

}" ]; node7 [label = "{ r40 | b23 |

}" ]; node8 [label = "{ r41 | 12f |

}" ]; node9 [label = "{ r42 | 1d3 |

}" ]; node0:p0 -> node1:e; node0:p1 -> node2:e; node2:p -> node3:e; node3:p -> node4:e; node4:p -> node5:e; node0:p2 -> node6:e; node0:p4 -> node7:e; node7:p -> node8:e; node8:p -> node9:e; } ==== UML Class Diagram ==== [[http://www.ffnn.nl/pages/articles/media/uml-diagrams-using-graphviz-dot.php|UML Diagrams Using Graphviz Dot]]\\ digraph G { fontname = "Bitstream Vera Sans" fontsize = 8 node [ fontname = "Bitstream Vera Sans" fontsize = 8 shape = "record" ] edge [ arrowhead = "empty" fontname = "Bitstream Vera Sans" fontsize = 8 ] Object [ label = "{Object|\\ - id : int\l|\\ }" ] Widget [ label = "{Widget|\\ - position : Vec2f\l|\\ + update() : void\l\\ + draw() : void\l}" ] Button [ label = "{Button|\\ - caption : string\l|\\ + press() : void\l}" ] Checkbox [ label = "{Checkbox|\\ - checked : bool\l\\ - caption : string\l|\\ + press() : void\l}" ] Button -> Widget Checkbox -> Widget Widget -> Object } ===== gnuplot ===== [[http://wiki.erazor-zone.de/doku.php?id=wiki:projects:php:dokuwiki:plugins:gnuplot|Homepage]] plot [-20:20] cos(x)/x