SpringGraph

Directed Graph alternative to GraphViz
Download

SpringGraph Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Aaron James Trevena
  • Publisher web site:
  • http://search.cpan.org/~teejay/

SpringGraph Tags


SpringGraph Description

Directed Graph alternative to GraphViz SpringGraph is a rewrite of the springgraph.pl script, which provides similar functionality to Neato and can read some/most dot files.The goal of this module is to provide a compatible interface to VCG and/or GraphViz perl modules on CPAN. This module will also provide some extra features to provide more flexibility and power.SYNOPSISuse SpringGraph qw(calculate_graph draw_graph);## object oriented interface ##my $graph = new SpringGraph;# add a node to the graph (with optional label)$graph->add_node('Paris', label =>'City of Love');# add an edge to the graph (with optional label, and directed)$graph->add_edge('London' => 'New York', label => 'Far', dir=>1);# output the graph to a file$graph->as_png($filename);# get the graph as GD image object$graph->as_gd;## procedural interface ##my %node = ( london => { label => 'London (Waterloo)'}, paris => { label => 'Paris' }, brussels => { label => 'Brussels'}, );my %link = ( london => { paris => {style => 'dotted'}, 'new york' => {} }, # non-directed, dotted and plain lines paris => { brussels => { dir => 1} }, # directed from paris to brussels );my $graph = calculate_graph(\%node,\%link);draw_graph($filename,\%node,\%link); Requirements: · Perl


SpringGraph Related Software