man pages section 1: User Commands

Exit Print View

Updated: July 2014

gvpack (1)


gvpack - merge and pack disjoint graphs


gvpack  [  -nguv?   ]  [  -mmargin ] [ -array[_flags][n] ] [
-ooutfile ] [ -Gname=value ] [ files ]


User Commands                                           GVPACK(1)

     gvpack - merge and pack disjoint graphs

     gvpack  [  -nguv?   ]  [  -mmargin ] [ -array[_flags][n] ] [
     -ooutfile ] [ -Gname=value ] [ files ]

     gvpack reads in a stream of graphs, combines the graphs into
     a  single layout, and produces a single graph serving as the
     union of the input graphs. The input graphs must be  in  dot
     format,  and  must  have  all  necessary layout information.
     Acceptable input is produced by applying a  Graphviz  layout
     program, such as dot or neato, with no -T flag.

     By  default, the packing is done at the cluster level. Thus,
     parts of one graph will not intrude into any top-level clus-
     ters or overlap any nodes or edges of another.

     The  output of gvpack can be used to produce concrete output
     by applying neato -s -n2 with the desired -T flag.

     The following options are supported:

     -g   Combines the graphs at the graph level. This uses  more
          space,  but  prevents parts of one graph from occurring
          between parts of another.

          Combines the graphs at the graph level, placing them in
          an  array.  By default, the layout is done in row-major
          order. The number of columns used is roughly the square
          root of the number of graphs. If the optional integer n
          is supplied, this indicates the number  of  columns  to


          If  optional  flags  are supplied, these consist of an
          by  any  of the letters "c", "t", "b", "l", "r" or "u".
          If "c" is supplied, the graphs are  packed  in  column-
          major  order,  in  which case a final integer specifies
          the number of rows.  The flags "t", "b", "l", "r" indi-
          cate that components are aligned along the top, bottom,
          left or right, respectively.  The  "u"  flag  indicates
          that   the  insertion  order  is  based  on  the  sortv
          attribute attached to each graph.


SunOS 5.11           Last change: 27 May 2010                   1

User Commands                                           GVPACK(1)

          Specifies attributes to be added to the resulting union
          graph. For example, this can be used to specify a graph

          Packs the graphs allowing a  margin  of  output  points
          around the parts.

     -n   Combines  the  graphs  at  the node level. Clusters are
          ignored in the packing.

          Prints output to the file output. If not given,  gvpack
          uses stdout.

     -u   Don't  pack the graphs. Just combine them into a single

     -v   Verbose mode.

     -?   Prints usage information and exit.

     The following operand is supported:

     files   Names of files containing 1 or more  graphs  in  dot
             format.  If no files operand is specified, the stan-
             dard input will be used.

     gvpack returns 0 if there were  no  problems,  and  non-zero

     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 using dot, packs them all together
     again, and produces the  final  drawing  in  PostScript.  Of
     course, there is nothing to prevent one from using different
     layouts for each component.

     All the input graphs must be directed or undirected.

     An input graph should not have a label, since this  will  be
     used  in its layout. Since gvpack ignores root graph labels,
     resulting layout may contain some extra space.

     gvpack unsets the bounding box attribute of all  non-cluster

SunOS 5.11           Last change: 27 May 2010                   2

User Commands                                           GVPACK(1)

     Emden R. Gansner <>

     See   attributes(5)   for   descriptions  of  the  following

     |Availability   | image/graphviz   |
     |Stability      | Volatile         |
     gvpr(1), dot(1), neato(1), twopi(1), ccomps(1), libpack(3)

     This  software  was   built   from   source   available   at    The  original
     community       source       was       downloaded       from

     Further information about this software can be found on  the
     open source community website at

SunOS 5.11           Last change: 27 May 2010                   3