Graph-Writer-DSM

 view release on metacpan or  search on metacpan

lib/Graph/Writer/DSM.pm  view on Meta::CPAN

package Graph::Writer::DSM;
$Graph::Writer::DSM::VERSION = '0.008';
use Modern::Perl;
use base qw( Graph::Writer );
use List::MoreUtils qw( uniq first_index apply );
use Chart::Gnuplot;
use File::Temp;

=head1 NAME

Graph::Writer::DSM - draw graph as a DSM matrix

=head1 VERSION

version 0.008

=head1 DESCRIPTION

Write graph as a quadractic matrix N x N, where N is the number of vertices in
the graph. It is useful to visualize graphs with at least 1k vertices.

See more about DSM: L<http://en.wikipedia.org/wiki/Design_structure_matrix>.

=head1 SYNOPSIS

    use Graph;
    use Graph::Writer::DSM;
    my $graph = Graph->new();
    my $writer = Graph::Writer::DSM->new(%OPTIONS);
    $writer->write_graph($graph, "output.png");

=head1 METHODS

=head1 new()

Like L<Graph::Writer::GraphViz>, this module provide some extra parameters
to new() method.

    $writer = Graph::Writer::DSM->new(color => 'red');

Supported parameters are:

=over 4

=item pointsize

Default: 0.2.

=item color

Default: 'blue'.

=item tics_label

Default: false.

=back

=cut
 
sub _init  {
  my ($self, %param) = @_;
  $self->SUPER::_init();



( run in 2.541 seconds using v1.01-cache-2.11-cpan-437f7b0c052 )