GraphViz::No - subclass of GraphViz with no nodes


GraphViz documentation Contained in the GraphViz distribution.

Index


Code Index:

NAME

Top

GraphViz::No - subclass of GraphViz with no nodes

SYNOPSIS

Top

  use GraphViz::No;

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

DESCRIPTION

Top

Graphs produced by GraphViz are occasionally huge, making it hard to observe the structure. This subclass removes the nodes, so that only the edges are visible. This allows 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::No;

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;
    $node->{width}  = 0;
    $node->{style}  = 'invis';
}

sub add_edge_munge {
    my $self = shift;
    my $edge = shift;

    $edge->{color} = rand() . "," . "1,1";
}

1;