Graph:...raphViz(3pm)

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

πŸ’– 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 GraphViz as_fmt methods on your system. So like, 'gif' works if you have as_gif, and 'text' works if you can do as_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 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