Graph Visualization (from text with links between objects to image)
Compatible with DokuWiki
This plugin can create directed and non-directed graph images from a textual description language called “dot” using the Graphviz program. It can use a locally installed graphviz or use Google's chart API for rendering.
The plugin supports exporting to OpenOffice through the ODT Plugin (only with a local graphviz install).
For more information on Graphviz and the dot language refer to the Graphviz documentation
This plugin was originally written by Carl-Christian Salvesen. The current plugin is a nearly complete rewrite and differs on how it works internally and where graphs are stored.
Download and install the plugin using the Plugin Manager using the URL given above. Refer to Plugins on how to install plugins manually.
The full path to your graphviz' dot binary can be configured in the config manager. When it isn't configured, remote rendering at Google is used.
Any Graphviz compatible graph definition can be given with graphviz tags.
The rendering engine can optionally be given as argument in the opening tag. Supported are dot, neato, twopi, circo and fdp with dot being the default.
You can also specify left, center or right to align the resulting image.
A parameter in the form of <number>x<number> is interpreted as wanted output size.
<graphviz dot right 500x200>
digraph finite_state_machine {
rankdir=LR;
size="9,5"
node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
node [shape = circle];
LR_0 -> LR_2 [ label = "SS(B)" ];
LR_0 -> LR_1 [ label = "SS(S)" ];
LR_1 -> LR_3 [ label = "S($end)" ];
LR_2 -> LR_6 [ label = "SS(b)" ];
LR_2 -> LR_5 [ label = "SS(a)" ];
LR_2 -> LR_4 [ label = "S(A)" ];
LR_5 -> LR_7 [ label = "S(b)" ];
LR_5 -> LR_5 [ label = "S(a)" ];
LR_6 -> LR_6 [ label = "S(b)" ];
LR_6 -> LR_5 [ label = "S(a)" ];
LR_7 -> LR_8 [ label = "S(b)" ];
LR_7 -> LR_5 [ label = "S(a)" ];
LR_8 -> LR_6 [ label = "S(b)" ];
LR_8 -> LR_5 [ label = "S(a)" ];
}
</graphviz>
It seems to be compatible with “Rincewind”, but I don't dare to list it as compatible based on only my test.
I use it in Rincewind, it seems to work fine for me! Thanks for this great plugin! jdt
I use it in Rincewind but it did not work as all my graphics disapeared (see issue 4. But I seem to have found a workaround since my problem seemed to be a cache problem:
syntax.php /** * Return path to the rendered image on our local system */ function _imgfile($data){ if($conf['debug']){ dbglog($cache, 'image file cache'); } $cache = $this->_cachename($data,'png'); // create the file if needed +++ /******************************************************* +++ **** CSJ added line ****/ +++ clearstatcache(); +++ /*******************************************************/ if(!file_exists($cache)){ $in = $this->_cachename($data,'txt'); if($this->getConf('path')){ $ok = $this->_run($data,$in,$cache); }else{ $ok = $this->_remote($data,$in,$cache); } if(!$ok) return false; clearstatcache(); } // resized version if($data['width']){ $cache = media_resize_image($cache,'png',$data['width'],$data['height']); } // something went wrong, we're missing the file if(!file_exists($cache)) return false; //print $cache; return $cache; }
So there you go!
Enjoy.
Claude
Make sure you have a Graphviz version compiled against Cairo, this will cause it to use it by default, and results in anti-aliased images.