Webdevelopment
Drupal
Betriebssysteme
Design
Sonstige
Di., 17/07/2012 - 11:38
Body
http://www.oliver-konow.de/2008/09/20/kleines-graphviz-tutorial-teil1/
Online tools
http://graphviz-dev.appspot.com/ http://zvtm.sourceforge.net/zgrviewer/applet/Offline/Other tools
http://www.graphviz.org/webdot/index.html http://www2.research.att.com/~john/Grappa/ | java http://www.pixelglow.com/graphviz/ | MAC onlyTutorials
http://jodiem.com.au/2012/09/28/using-graphviz-in-confluence-a-tutorial/ http://wiki.ubuntuusers.de/Graphviz http://4webmaster.de/wiki/Graphviz-Tutorial http://www.linuxjournal.com/article/7275?page=0,1 http://www.poirrier.be/~jean-etienne/articles/graphviz/ http://www.deesaster.org/dot/Graphen_zeichnen_mit_dot.pdf http://wiki.zum.de/Hilfe:Graphviz | wiki syntax http://talks.spline.de/slides/graphviz.pdf http://www.oliver-konow.de/2008/09/29/kleines-graphviz-tutorial-teil2/ www.graphviz.org/pdf/dotguide.pdfEigene Symbole
http://www.graphviz.org/wiki/how-create-custom-shapes http://www.karakas-online.de/forum/viewtopic.php?t=2647 http://rhodesmill.org/brandon/2007/a-database-symbol-for-graphviz/ http://stackoverflow.com/questions/8382304/how-to-generate-nodes-with-customized-shape Der Pfad muss stimmen unter Linux setzt man environment variablen so: http://lowfatlinux.com/linux-environment-variables.html- SERVER_NAME=myservername
- GV_FILE_PATH=/var/www/graphviz_images
Install + php
For php: http://pear.php.net/package/Image_GraphViz/download bad docs, unmaintained? newer: aptitude install libgv-php5, see grapgviz page: http://www.graphviz.org/Documentation.php load the lin in php.ini "extension=gv.so" http://www.graphviz.org/pdf/gv.3php.pdf gv.3pgp needs "Then the 'enable_dl' setting in the php.ini needed" http://stackoverflow.com/questions/2241382/php-graphviz-documentation Of course install Graphviz.An example using gv.3php
- <?php
- $myGraph = gv::digraph("myGraph");
- //adding nodes
- $n1 = gv::node ($myGraph, 'a nodes name 1');
- $n2 = gv::node ($myGraph, 'a nodes name 2');
- $n4 = gv::node ($myGraph, 'a nodes name 3');
- $n5 = gv::node ($myGraph, 'a nodes name 4');
- //adding connetcions
- gv::edge ($n1, $n2);
- gv::edge ($n2, $n4);
- gv::edge ($n4, $n5);
- gv::layout ($myGraph, 'neato');
- //saving the image
- gv::render ($myGraph, "png", "ggg.png");
- ?>
Example using the pear graphviz package
- <?php
- require_once 'Image/GraphViz.php';
- $gv = new Image_GraphViz();
- $gv->addEdge(array('wake up' => 'visit bathroom'));
- $gv->addEdge(array('visit bathroom' => 'make coffee'));
- //directly outputs to browser
- //$gv->image();
- //save the PNG image data to a temporary PNG file
- $file = fopen("test.png", "wb");
- $raw_data = $gv->fetch('png');
- fwrite ($file, $raw_data);
- fclose($file);
- ?>
Directly using console (notrecommended in this way)
- <?php
- $data = '
- main -> parse -> execute
- main -> init
- main -> cleanup
- execute -> make_string
- execute -> printf
- init -> make_string
- main -> printf
- execute -> compare
- ';
- $data_str = str_replace(" ","", $data);
- echo exec('echo "digraph G {' . $data_str . '}" | dot -Tpng >Yhello.png');
- ?>
Graphviz attributes
http://www.graphviz.org/doc/info/attrs.htmlHover effekt auf SVG
http://stackoverflow.com/questions/7450501/interactive-directed-graphs-with-svg-and-javascript http://old.nabble.com/simple-hovering-and-clicking-using-SVG-layers-and-CSS-td34165151.html http://www.petercollingridge.co.uk/data-visualisation/mouseover-effects-svgsJs libs/tools
http://www.ryandesign.com/canviz/Use in php test
Test
echo "digraph G {Hello->World}" | dot -Tpng >hello.png
Probleme mit drupal render()
Ganz toll .... http://drupal.org/node/1408224
Webdevelopment
Add new comment