The 2001 Perl Advent Calendar
[about] | [archives] | [contact] | [home]

On the 9th day of Advent my True Language brought to me..

GraphViz is a module that allows you to produce Graphs - that is to say diagrams with nodes connected by links. I personally use GraphViz to produce diagrams of our network and systems. For me, writing out a quick set of perl is infinitely easier than faffing around with a vector based graphics program. We all really, really hate to create why not let Perl do it for us?

GraphViz's great strength comes from the fact that the programmer does not have to worry about the layout of the nodes - the program itself moves nodes around to produce the most optimum and clear layout. Of course you are able to group and otherwise influence the nodes, but this simplicity - freeing you up from the hassles of worrying about design and just concentrating on content - allows you to work much quicker. More importantly, it makes it possible to write programs that feed data into GraphViz that do not necessarily have access to context data that would normally be required for layout.

Leon Brocard has also included many such utilities with the GraphViz distribution that allow the perl programmer to produce useful things with GraphViz. Find dprof too complicated? Get GraphViz to draw a graph, each node representing a sub procedure with weightings on the nodes. Want a tree representation of XML? Use GraphViz::XML. Finding a regular expression hard to understand? Use GraphViz::Regex. You get the idea.

  • GraphViz::XML
  • GraphViz::Regex
  • The Graphviz software homepage