|
GraphViz<< | Cookbook-V1.HomePage | >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook. GoalUse text markup to generate graphs within the wiki editor FrançoisElie: I had the same goal. SolutionUsing graphviz as a backend, this script generates dot graphs and displays them inline. Visit http://www.graphviz.org/Documentation.php for complete documentation on available commands. the markup looks like the following: =graphviz [=
// any dot language calls are valid here --
// it's passed directly to webdot
digraph G {
Hello->World;
}
=]
gives ![]() DiscussionFrançoisElie: due to PmWiki 2, we have to use another convention for the directive (cf PM remarks in the lists), so (:graphviz [=
// any dot language calls are valid here --
// it's passed directly to webdot
digraph G {
Hello->World;
}
:)
You must have downloaded and installed the graphviz and webdot utilities from http://www.graphviz.org/. You should test the webdot utility outside of pmwiki to ensure it was set up properly. FrançoisElie: it is possible to use graphviz in PmWiki with only dot. In the version I propose, you have the choice: dot (exec in php) or webdot (in perl). Thereis a limitation with the directive graphwiki, which require dot. Edit the graphviz.php file to reflect the setup of your machine. There are three variables after the license that should be inspected and probably changed. Place the graphviz.php script into your local/ directory, and call include_once( 'local/graphviz.php') from your config.php file. FrançoisElie
see samples at http://maison.elie.org/pmwiki/index.php/Elie/GraphViz Enjoy! History
Comments & BugsContributors
Copyright(c) 2004 Paul Williams, Licensed under BSD-style License, see graphviz.php comments for more information.
|