GraphViz::Small - subclass of GraphViz with small nodes


GraphViz documentation Contained in the GraphViz distribution.

Index


Code Index:

NAME

Top

GraphViz::Small - subclass of GraphViz with small nodes

SYNOPSIS

Top

  use GraphViz::Small;

  my $g = GraphViz::Small->new();
  # methods as for GraphViz

DESCRIPTION

Top

Graphs produced by GraphViz are occasionally huge, making it hard to observe the structure. This subclass simply makes the nodes small and empty, allowing the structure to stand out.

METHODS

Top

As for GraphViz.

AUTHOR

Top

Leon Brocard <acme@astray.com>

COPYRIGHT

Top


GraphViz documentation Contained in the GraphViz distribution.
package GraphViz::Small;

use strict;
use warnings;
use GraphViz;
use vars qw($VERSION @ISA);

# This is incremented every time there is a change to the API
$VERSION = '0.01';

@ISA = qw(GraphViz);

sub add_node_munge {
    my $self = shift;
    my $node = shift;

    $node->{label}  = '';
    $node->{height} = 0.2;
    $node->{width}  = 0.2;
    $node->{style}  = 'filled';
    $node->{color}  = 'black' unless $node->{color};
}

1;