You are here: CTSPedia>System Web>DirectedGraphPlugin (19 Mar 2009, ColeBeck?)EditAttach
Tags:
create new tag
, view all tags, tagging instructions

Directed Graph Plugin

This plugin accepts valid input to create a .dot file. Graphviz's dot application is then used to create a .png of the directed graph.

Syntax Rules

Enclose the rules for your directed graph within <dot> ... </dot> tags.

You may create a clientside map of the graph by setting map to 1 within the dot tags: <dot map=1> ... </dot>.

Examples

You type:

<dot>
digraph G {
    subgraph cluster_c0 {a0 -> a1 -> a2 -> a3}
    subgraph cluster_c1 {
        b0 -> b1 -> b2 -> b3;
        label="Group B";
    }
    x -> a0;
    x -> b0;
    a1 -> a3 [style=bold, label="a1 to a3"];
    a3 -> a0;
    a0 [shape=box, fontname=Courier, fontsize=11];
    a1 [color=red];
    a3 [label="Label\nfor a3"];
    label="Cole's Example";
}
</dot>

You get: (simulated)
graphsample.png
You get: (if installed)

You type:

<dot map=1>
digraph G {
    URL="http://www.twiki.org";
    Plugins [URL="http://twiki.org/cgi-bin/view/Plugins/PluginPackage"];
    DirectedGraphPlugin [URL="http://twiki.org/cgi-bin/view/Plugins/DirectedGraphPlugin"];
    Plugins -> DirectedGraphPlugin;
}
</dot>

You get: (simulated)
You get: (if installed)

DirectedGraphPlugin Global Settings

  • One line description, shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Embed directed graphs in TWiki topics

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

Plugin Installation Instructions

Note: The following instructions are for the administrator who installs the plugin on the server where TWiki is running.

  • Install the Graphviz package
  • Install required web fonts
  • Install the Perl module Digest::MD5
  • Download the ZIP file from the Plugin web (see below)
  • Unzip DirectedGraphPlugin.zip in your twiki installation directory.
Content:
File: Description:
data/TWiki/DirectedGraphPlugin.txt Plugin topic
data/TWiki/DirectedGraphPlugin.txt,v Plugin topic repository
lib/TWiki/Plugins/DirectedGraphPlugin.pm Plugin Perl module
pub/TWiki/DirectedGraphPlugin/graphsample.png sample image
pub/TWiki/DirectedGraphPlugin/graphsample2.png sample image

Dependencies:

Package: Description:
Graphviz dot Preprocessor for drawing directed graphs
Digest::MD5 MD5 Perl module
Web fonts Fonts required for dot's png creations

To install the web fonts, download this rpm and run the command rpm --install webfonts-1.0-5.noarch.rpm (Red Hat only).

Plugin Info

Plugin Author: TWiki:Main/ColeBeck
Plugin Version: 13 Apr 2005 (V1.200)
Change History:  
13 Apr 2005: Added clientside maps functionality; correctly finds pub directory
25 Mar 2005: Cleaner code
01 Jul 2004: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.024
CPAN Dependencies: Digest::MD5
Other Dependencies: Graphviz
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle 100%, FormattedSearch 100%, DirectedGraphPlugin 100%
Plugin Home: http://twiki.org/cgi-bin/view/Plugins/DirectedGraphPlugin
Feedback: http://twiki.org/cgi-bin/view/Plugins/DirectedGraphPluginDev
Appraisal: http://twiki.org/cgi-bin/view/Plugins/DirectedGraphPluginAppraisal

Related Topics: TWikiPreferences, TWikiPlugins

-- ColeBeck? - 01 Jul 2004

Topic revision: r2 - 19 Mar 2009 - 17:00:47 - ColeBeck?
 
This site is powered by FoswikiCopyright & by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding CTSPedia? Send feedback