---
name: "Graph::Writer::DSM"
section: "3pm"
platform: "linux"
package: "libgraph-writer-dsm-perl"
version: "0.008-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Graph::Writer::DSM"
---

# Graph::Writer::DSM(3pm)

draw graph as a DSM matrix

## NAME

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

## VERSION

version 0.008

## 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: \<http://en.wikipedia.org/wiki/Design\_structure\_matrix\>.

## SYNOPSIS

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

## METHODS

## new()

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

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

Supported parameters are:

- pointsize

  Default: 0.2.

- color

  Default: 'blue'.

- tics\_label

  Default: false.

## write\_graph()

Write a specific graph to a named file:

```
    $writer->write_graph($graph, $file);
```

The `$file` argument can either be a filename, or a filehandle for a previously opened file.

## SEE ALSO

Graph, Graph::Writer, Chart::Gnuplot.

## COPYRIGHT

Copyright (c) 2013, Joenio Costa
