Skip to topic | Skip to bottom
Home
TWiki
TWiki.DirectedGraphPluginr1.11 - 13 Apr 2005 - 17:40 - ColeBecktopic end

You are here: TWiki > DirectedGraphPlugin

Start of topic | Skip to actions

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
to top


You are here: TWiki > DirectedGraphPlugin

to top

Home | VUMC Web Email | Medical Center Home | VU | Statistics at Vanderbilt | VICC Cancer Biostatistics Division

Vanderbilt Biostatistics
S-2323 Medical Center North, 1161 21st Avenue South, Nashville, TN 37232-2158
(615) 322-2001 • fax (615) 343-4924
General questions about the department? E-mail biostat@vanderbilt.edu

Copyright © 2003-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Do you have ideas, requests, problems regarding Biostatistics TWiki web site? Send feedback.