man(1) Manual page archive


     TWOPI(1)                 (24 March 2002)                 TWOPI(1)

     NAME
          twopi - preprocessor for circular layouts of graphs

     SYNOPSIS
          twopi [-Gname=value] [-Nname=value] [-Ename=value] [-Tlang]
          [-l libfile] [-o outfile] [-vV] [files]

     DESCRIPTION
          twopi draws graphs using a circular layout (see G. Wills,
          Symposium on Graph Drawing GD'97, September, 1997). Basi-
          cally, one node is chosen as the center and put at the ori-
          gin.  The remaining nodes are placed on a sequence of con-
          centric circles centered about the origin, each a fixed
          radial distance from the previous circle.  All nodes dis-
          tance 1 from the center are placed on the first circle; all
          nodes distance 1 from a node on the first circle are placed
          on the second circle; and so forth.

          Input files must be formatted in the dot attributed graph
          language.  By default, the output of twopi is the input
          graph with layout coordinates appended.  To make PostScript,
          use the -Tps option.  FrameMaker MIF (-Tmif), HPGL (-Thpgl),
          JPEG (-Tjpeg), SVG (-Tsvg), and GIF (-Tgif) are other
          choices.

          Here is a brief synopsis of the graph language.

          graph name { statement-list } is the top level graph.
          Statements may be:

          name=val;
          node [name=val];
          edge [name=val]; Set the default graph, node, or edge
          attribute name to val.  Any subgraph, node, or edge speci-
          fied after one of these statements inherits these
          attributes.

          n0 [name0=val0,name1=val1,...]; Creates node n0 if it does
          not exist, and sets its attributes according to the optional
          list.

          n0 -- n1 -- ... -- nn [name0=val0,name1=val1,...]; Creates
          edges between nodes n0, n1, ..., nn and optionally sets the
          given attributes.  Creates nodes as necessary.

          subgraph name { statement-list } Creates a subgraph.  A sub-
          graph may appear in place of an individual node within an
          edge statement.  The subgraph name part is optional. If
          missing, the subgraph is given an internal name.

     TWOPI(1)                 (24 March 2002)                 TWOPI(1)

          While attribute names and values may be arbitrary strings,
          certain fixed attributes control twopi's layout algorithm,
          as next described.

     GRAPH ATTRIBUTES
          Refer to dot(1) options to control the layout size.  In
          addition, twopi recognizes the following:

          root=ctr. This specifies the node to be used as the center
          of the layout. If not specified, twopi will randomly pick
          one of the nodes that are furthest from a leaf node, where a
          leaf node is a node of degree 1. If no leaf nodes exists, an
          arbitrary node is picked as center.

          ranksep=val. Specifies the radial distance in inches between
          the sequence of rings. The default is 0.75.

          overlap=mode. This specifies what twopi should do if any
          nodes overlap. If mode is "false", the program uses Voronoi
          diagrams to adjust the nodes to eliminate overlaps. If mode
          is "scale", the layout is uniformly scaled up, preserving
          node sizes, until nodes no longer overlap. The latter tech-
          nique removes overlaps while preserving symmetry and struc-
          ture, while the former removes overlaps more compactly but
          destroys symmetries.  If mode is "true" (the default), no
          repositioning is done.

          splines=true/false. If set to true, twopi will use the gra-
          phviz path planning library to draw edges as splines avoid-
          ing nodes.  If the value is false, or some nodes overlap,
          edges are drawn as straight line segments connecting nodes.
          This is also the default style.

     NODE ATTRIBUTES
          Refer to dot(1) for options to control node labels, shapes,
          sizes, colors, fonts, etc.

     EDGE ATTRIBUTES
          Refer to dot(1) for options to control edge line style and
          labels.

     COMMAND LINE OPTIONS
          -v (verbose) prints the center node and the rank separation.
          -V (version) prints version information and exits.

     BUGS
     AUTHOR
          Emden R. Gansner <erg@research.att.com>

     SEE ALSO
          dot(1), neato(1)