Graph:...raphViz(3pm)
π Graph::Writer::GraphViz π
okay bestie, welcome to the manual page for Graph::Writer::GraphViz β it's the GraphViz Writer for Graph object, and honestly? it's giving "I make your graphs look cute on purpose." π This one's shipped as part of the user-contributed Perl documentation, and we're gonna walk through the whole thing together, no skips, fr fr.
β¨ SYNOPSIS β¨
like, just look at it:
my @v = qw/Alice Bob Crude Dr/;
my $g = Graph->new(@v);
my $wr = Graph::Writer::GraphViz->new(-format => 'dot');
$wr->write_graph($g,'/tmp/graph.simple.dot');
my $wr_png = Graph::Writer::GraphViz->new(-format => 'png');
$wr_png->write_graph($g,'/tmp/graph.simple.png');
Graph::Writer::GraphViz->new(
-format => 'png',
-layout => 'twopi',
-ranksep => 1.5,
-fontsize => 8
-edge_color => 'grey',
-node_color => 'black',
)->write_graph($g,'/tmp/graph.png');
(yes we're keeping it character for character, comma situation included β that's a whole mood and we don't touch it π )
πΈ DESCRIPTION πΈ
So Graph::Writer::GraphViz is a class for writing out a Graph object with the GraphViz module. That's the whole vibe. And the tea is: all GraphViz formats should be supported without a problem β¨ no cap, she's flexible like that.
π¦ METHODS π¦
π new()
Unlike other Graph::Writer modules, this module gives you an extra parameter called '-format' on the new() method β that's the whole point, so you can save in different formats, periodt. π
Other GraphViz parameters she supports are -layout, -ranksep, -shape, -fontsize, and -arrowsize. Wanna see them in action? Go peek at the SYNOPSIS above, bestie, the examples are right there. π«Ά
heads up: which formats are actually valid depends on those GraphVizas_fmtmethods on your system. So like,'gif'works if you haveas_gif, and'text'works if you can doas_text. it's a vibe check with your local install, iykyk π
π SEE ALSO π
- Graph
- Graph::Writer
- GraphViz
π AUTHOR π
Kang-min Liu <gugod@gugod.org> β icon behavior, we stan π
π CREDITS π
Big love to RURBAN@cpan.org for noticing tests failure on different platforms. thank you for your service, king π«‘β¨
π COPYRIGHT π
Copyright 2004 by Kang-min Liu <gugod@gugod.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
See <http://www.perl.com/perl/misc/Artistic.html>
and that's the whole page, bestie π this one was generated by perl v5.34.0 on 2022-04-15, and it's filed under Graph:...raphViz(3pm) in the user-contributed Perl docs. go forth and make pretty graphs πΈπ¦β
π¦ where this page comes from
- debian bookworm: libgraph-writer-graphviz-perl 0.12-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgraph-writer-graphviz-perl 0.12-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgraph-writer-graphviz-perl 0.12-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgraph-writer-graphviz-perl 0.12-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgraph-writer-graphviz-perl 0.12-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms