Generates Graphviz graphics using shortcodes. Supports almost all Graphviz features.
Graphviz is a way of generating visualisations of structural relationships between objects. Almost any kind of diagram where something connects to something else can be drawn and automatically laid out using the language DOT.
[graphviz] shortcode. Details are in the Description section.
There are however several other introductions to Graphviz and DOT, including an excerpt on the O'Reilly LinuxDevCenter.com site. Another approach would be to look at the examples in the Graphviz gallery.
Users should note that DOT syntax varies between Graphviz processors and also between versions of those processors. If in doubt, find an example and experiment with it.
img elements are tagged with '
If you're using a local Graphviz renderer then errors from Graphviz should be presented where you expect the graph to appear. Note that because of how WordPress submits content to plugins the line numbering will not always match what you expect.
The error message when using the
dot binary will contain the command line used as well as a line-numbered copy of the DOT that was used.
WordPress encodes HTML entities inside the shortcode block which this plugin attempts to demangle.
Unfortunately WordPress can also try to do smart character replacement, such as "..." into a UNICODE ellipsis character. The Graphviz plugin contains a mapping of many of these back to their ASCII equivalents, but it may not be complete. Let us know if you think this is breaking your DOT. It's also possible that non-ASCII7 characters do strange things too.
define("TFO_GV_DEBUG", true) to wp_config.php will cause the plugin to create some diagnostic files in your system
tmp directory. The file
pre-N.dot is the contents of the DOT as given to the plugin by WordPress,
post-N.dot is the results of the plugin attempting to demangle it. The
N is a number that is incremented for each shortcode section interpreted. The plugin does not clean these files up.
This depends on your local operating system. You will find some details at http://www.graphviz.org/Download.php but many systems also have it in their own package management system, for example this is package
graphviz on Debian, Ubuntu and Fedora systems.
There are currently two ways to use a local installation of Graphviz. The settings page will only show options for those methods that are actually available and configured correctly.
dotbinary. You configure the path to this binary on the admin settings page of the plugin.
This requires that
gv.php is available and that the associated module is either already loaded or loadable with
The use of
dl() is often disabled in
php.ini and doesn't work on multithreaded webservers; it's entirely disabled in modern Apache2 httpd modules.
For these cases you must ensure the library is loaded with an entry like
extension=gv.so or similar somewhere in the PHP configuration.