Graphviz: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
Line 11: Line 11:
A directed graph that is represented like this  
A directed graph that is represented like this  
<pre>
<pre>
<graphviz>
digraph G4 {
digraph G4 {
             Perl [URL="Perl code"];
             "Learning theories" [URL="Learning theory"];
             Java [URL="Java rocks"];
             "Pedagogic strategy" [URL="Pedagogic strategy"];
             Perl -> Java
    "Instructional design model" [URL="Instructional design model"];
             "Learning theories" -> "Pedagogic strategy";
            "Instructional design model" -> "Pedagogic strategy"
}
}
</graphviz>
</graphviz>
</pre>
</pre>
could render like that (yes this wiki has a graphviz extension, but we may not keep it for sure since it is somewhat CPU intensive)
could render like that (yes this wiki has a graphviz extension, but we may not keep it for sure since it is somewhat CPU intensive)

Revision as of 16:05, 5 March 2008

Draft

Definition

  • Graphviz is an open source graph visualization software. It has several main graph layout programs

The dot representation language

A directed graph that is represented like this

digraph G4 {
            "Learning theories" [URL="Learning theory"];
            "Pedagogic strategy" [URL="Pedagogic strategy"];
	    "Instructional design model" [URL="Instructional design model"];
            "Learning theories" -> "Pedagogic strategy";
            "Instructional design model" -> "Pedagogic strategy"
}
</graphviz>

could render like that (yes this wiki has a graphviz extension, but we may not keep it for sure since it is somewhat CPU intensive)

Or a more complex non-directed graph (rendered with neato):

<graphviz renderer='neato' caption='Hello Neato'>
graph G {
   run -- intr;
   intr -- runbl;
   runbl -- run;
   run -- kernel;
   kernel -- zombie;
   kernel -- sleep;
   kernel -- runmem;
   sleep -- swap;
   swap -- runswap;
   runswap -- new;
   runswap -- runmem;
   new -- runmem;
   sleep -- runmem;
}
</graphviz>

like this

Tools

See Graphviz - Graph Visualization Software (a longer list of interfaces, bindings, generators, scripts, etc.). Usually also needs graphviz software and the other way round. I.e. after installing Graphviz, you likely want to install a viewer or generator.

Mediawiki extensions

GraphiViz Viewers


Installation

  • Download of GraphViz software (source and Win/Linux binaries).
  • Under Ubuntu I could install it through the package manager (there are quite a lot of dependencies).
  • For solaris, you can download a binary from sunfreeware.com plus these: cairo-1.4.10, freetype-2.3.1, glib-2.14.1, graphviz-2.16.1, pango-1.18.2, xrender-0.8.3,expat-2.0.1.

Tutorials and introductions