Graph:...r::DSM(3pm)

πŸ“¦
version 0.008 Β· 2 versions
  • 0.008 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.008 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Graph:...r::DSM(3pm) β€” bestie's guide to drawing graphs as DSM matrices πŸ’–

okay so this is Graph:...r::DSM(3pm), straight out of the User Contributed Perl Documentation, and it's literally the moment your graph becomes a little grid of vibes. welcome 🫢


✨ NAME ✨

Graph::Writer::DSM β€” draw graph as a DSM matrix πŸŽ€


🌸 VERSION 🌸

version 0.008 β€” yes she's got a version number and yes she's serving ✨


πŸ’… DESCRIPTION πŸ’…

okay so what this does: it writes your graph as a quadractic matrix, N x N, where N is the number of vertices in the graph. (and yes the original spells it quadractic β€” we keep the receipts, no cap πŸ§ΎπŸ’–)

it's useful to visualize graphs with at least 1k vertices. like, tiny graphs? sure, whatever, but this thing is built for the big ones πŸ”₯

wanna know more about DSM? go read up on it here, fr fr:

<http://en.wikipedia.org/wiki/Design_structure_matrix>

no HTML links allowed in my cute little rewrite so just copy that URL into your browser bestie, it's the wikipedia page for Design structure matrix, that's the DSM lore πŸ“šβœ¨

πŸ¦‹ SYNOPSIS πŸ¦‹

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

look at her go. use it, new it, write_graph it, and boom: output.png πŸ“Έβœ¨


πŸ‘‘ METHODS πŸ‘‘

🌈 new()

like Graph::Writer::GraphViz, this module provides some extra parameters to the new() method. so you can be extra. as you should. πŸ’…

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

supported parameters are, bestie, listen up:

  • pointsize β€” Default: 0.2. tiny dots, big energy ✨
  • color β€” Default: 'blue'. πŸ’™ (but you can absolutely change it, see above)
  • tics_label β€” Default: false. off by default, turn it on if you want those labels

πŸ“ write_graph()

write a specific graph to a named file, like so:

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

the $file argument can either be a filename, or a filehandle for a previously opened file. so flexible. so iconic. πŸ‘‘


⭐ SEE ALSO ⭐

  • Graph
  • Graph::Writer
  • Chart::Gnuplot

go read those too, iykyk 🧚


Copyright (c) 2013, Joenio Costa


πŸ’€ heads up bestie: this whole thing is documented for perl v5.36.0, dated 2022-12-12, and the page title is literally Graph:...r::DSM(3pm) β€” truncated and everything, we don't judge, we stan πŸ™ˆπŸ’–

mwah, that's the whole page. go make some matrices, you main character πŸŒŸπŸ’…

πŸ“¦ where this page comes from