GVPACK(1)

GVPACK(1) πŸ’–

okay bestie, welcome to the General Commands Manual page for gvpack, and honestly? she's a baddie. let's get into it πŸ’…


✨ NAME ✨

gvpack β€” merge and pack disjoint graphs 🫢


🌸 SYNOPSIS 🌸

gvpack [ -nguv?  ] [ -mmargin ] [ -arrayopts ] [ -ooutfile ] [
-sgraph_name ] [ -Gname=value ] [ files ]

πŸ’– DESCRIPTION πŸ’–

so gvpack reads in a whole stream of graphs, smushes them together into one single layout, and spits out a single graph that's basically the union of all the inputs. slay.

the input graphs must be in dot format, and they must have all the layout info they need already. and where do you get acceptable input? you get it by running a Graphviz layout program β€” like dot or neato β€” with no -T flag. periodt.

by default, the packing happens at the cluster level. so like, parts of one graph will not intrude into any top-level clusters, and they won't overlap any nodes or edges of another graph. respectful. we love boundaries πŸ’œ

and the output of gvpack? you can turn it into concrete output by applying neato -s -n2 with whatever -T flag you're feeling. iconic behavior fr fr.


✨ OPTIONS ✨

here's everything she supports, no cap:

  • -g β€” combines the graphs at the graph level. it uses more space, but it stops parts of one graph from ending up between parts of another. worth it for the aesthetic tbh.
  • -array[_flags][n] β€” combines the graphs at the graph level, but places them in an array πŸŽ€. by default the layout goes in row-major order, and the number of columns is roughly the square root of the number of graphs. if you supply that optional integer n, that's the number of columns to use. you're in charge, main character energy.

if optional flags are supplied, they're an underscore followed by any of the letters "c", "t", "b", "l", "r", "u" or "i". if "c" is supplied, the graphs are packed in column-major order, and in that case a final integer specifies the number of rows. the flags "t", "b", "l", "r" mean components are aligned along the top, bottom, left or right, respectively. by default, the insertion order is decided by sorting the graphs by size, largest to smallest. if the "u" flag is set, the graphs get sorted based on the non-negative integer sortv attribute attached to each graph. and the "i" flag means no sorting at all β€” the graphs get inserted in input order. iykyk.

  • -Gname=value β€” specifies attributes to be added to the resulting union graph. for example, you can use this to specify a graph label 🏷️.
  • -mmargin β€” packs the graphs allowing a margin of output points around the parts. give her some personal space ✨
  • -n β€” combines the graphs at the node level. clusters are ignored in the packing. bye clusters πŸ‘‹
  • -ooutput β€” prints output to the file output. if you don't give this, gvpack uses stdout. classic.
  • -sgraph_name β€” use graph_name as the name of the root graph. by default, "root" is used. cute.
  • -u β€” don't pack the graphs. just combine them into a single graph. minimal effort, still valid πŸ’…
  • -v β€” verbose mode. she will talk.
  • -? β€” prints usage information and exits. the little help meow meow.

πŸ¦‹ OPERANDS πŸ¦‹

the following operand is supported:

  • files β€” names of files containing 1 or more graphs in dot format. if no files operand is specified, the standard input will be used. stdin bestie, we love her 🫢

🌈 RETURN CODES 🌈

gvpack returns 0 if there were no problems, and non-zero otherwise. that's it, that's the vibe check ⭐


πŸ’œ EXAMPLES πŸ’œ

ccomps -x abc.gv | dot | gvpack | neato -s -n2 -Tps

this pipeline decomposes the graph in abc.gv into its connected components, lays out each one using dot, packs them all back together again, and produces the final drawing in PostScript. and of course, there is nothing stopping you from using different layouts for each component. mix and match, go off πŸ”₯


πŸŽ€ BUGS πŸŽ€

okay listen, the tea:

  • all the input graphs must be directed or undirected. you cannot mix, bestie. pick a lane 😭
  • an input graph should not have a label, since this will be used in its layout. and since gvpack ignores root graph labels, the resulting layout may contain some extra space. lowkey annoying but that's the deal πŸ™ˆ
  • gvpack unsets the bounding box attribute of all non-cluster subgraphs. just so you know.

πŸ‘‘ AUTHORS πŸ‘‘

Emden R. Gansner <erg@research.att.com> β€” the legend herself. we stan 🌟


🌸 SEE ALSO 🌸

gvpr(1), dot(1), neato(1), twopi(1), ccomps(1), libpack(3)


and that's the whole page, bestie 🧚 this was GVPACK(1) from the General Commands Manual, dated 27 May 2010. go pack some graphs, you absolute icon πŸ’–βœ¨

πŸ“¦ where this page comes from