|
|
1.1 ! root 1: .TH DAG 1 "15 April 1987" ! 2: .SH NAME ! 3: dag \- preprocessor for DAGs and other directed graphs ! 4: .SH SYNOPSIS ! 5: .B dag ! 6: [ ! 7: .B \-T\fItype\fP ! 8: ] [ ! 9: .B \-p\fIwidth\fPx\fIheight\fP ! 10: [ ! 11: .B ,\fImarginwidth\fP ! 12: [ ! 13: .B x\fImarginheight\fP ! 14: ] ] ! 15: ] [ ! 16: .B \-O ! 17: ] [ ! 18: .B \-l ! 19: ] [ files ] ! 20: .SH DESCRIPTION ! 21: .I Dag ! 22: is a ! 23: .IR pic (1) ! 24: or ! 25: .IR Postscript ! 26: preprocessor for drawing directed graphs. It works well on ! 27: directed acyclic graphs and other graphs that can be drawn ! 28: as a hierarchy. ! 29: .IR dag ! 30: selects coordinates for the nodes of the graph and creates a picture. ! 31: Input graphs are surrounded by the ! 32: .I troff ! 33: `commands' ! 34: .B \&.GS ! 35: and ! 36: .BR \&.GE . ! 37: The graph contains nodes, edges, and optional control statements. ! 38: Statements are semicolon terminated. Here is a brief summary: ! 39: .PP ! 40: \fBedge from\fP \fItail\fP \fBto\fP \fIhead0 edge-items, \fBto\fP head1 edge-items, \fBto\fP head2 edge-items... \fR: creates edges from the tail node ! 41: to the head nodes (or node). Nodes are implicitly created if they do ! 42: not already exist. \fIedge-items\fP (which apply to the ! 43: edge just made, as described below) and the noisewords \fBedge\fP, ! 44: \fBfrom\fP, and \fBto\fP are optional. Node names may be quoted ! 45: to avoid conflicting with keywords. ! 46: .PP ! 47: \fBordered\fP \fI tail head0 head1 head2... \fR: makes edges and also ! 48: constrains the left-to-right order of the head nodes and keeps them ! 49: on the same rank. May contain noisewords and edge-items. ! 50: .PP ! 51: \fBpath\fP \fI node0 node1 node2...\fR: creates a path of edges. ! 52: May contain noisewords and edge-items. ! 53: .PP ! 54: \fBbackedge\fP \fItail head0 head1 head2...\fR: creates edges that ! 55: point backward (up or left). ! 56: .PP ! 57: \fBbackpath\fP \fInode0 node1 node2...\fR: makes a path of backedges. ! 58: .PP ! 59: \fBdraw nodes\fP \fInode-items\fP: Changes default definition for all nodes ! 60: subsequently created. \fInode-items\fP are: \fBas\fP \fIshape\fP ! 61: (standard shapes are \fBBox, Circle, Ellipse, Diamond, Square,\fP ! 62: and \fBPlaintext\fP), \fBlabel\fR \fIstring\fP, ! 63: \fBpointsize\fP \fIn\fP, \fBwidth\fP \fIn\fP, ! 64: \fBheight\fP \fIn\fP, \fBcolor\fP \fIstring\fP. Dimensions are ! 65: in inches. \fIcolor\fP only works with PostScript and should evaluate ! 66: to an HSB triple. ! 67: .PP ! 68: \fBdraw\fP \fInodelist\fP \fInode-items\fP: controls drawing (shapes, ! 69: labels, etc.) of nodes in the list. ! 70: .PP ! 71: \fBdraw edges\fP \fIedge-items\fP: Changes default definition of edges ! 72: subsequently created. \fIedge-items\fP are: \fBdotted, dashed, solid\fP, ! 73: or \fBinvis\fP, \fBlabel\fP \fIstring\fP, \fBweight\fP \fIn\fP, ! 74: \fBcolor\fP \fIstring\fP, \fBpointsize\fP \fIn\fP. ! 75: .PP ! 76: \fBminimum rank\fP \fInodelist\fP: constrains nodes ! 77: to be on the topmost rank (or leftmost if drawn with .GR). ! 78: .PP ! 79: \fBmaximum rank\fP \fInodelist\fP: bottommost or rightmost rank. ! 80: .PP ! 81: \fBsame rank\fP \fInodelist\fP: constrains nodes to be ! 82: placed on the same rank. ! 83: .PP ! 84: \fBseparate ranks\fP \fIn\fP \fBequally\fP or \fBexactly\fP: ! 85: sets separation between ranks. ! 86: \fBexactly\fP means rank separation is fixed. ! 87: \fBequally\fP means that all ranks have the same separation. ! 88: .PP ! 89: The \fB\-O\fP option requests ``optimal'' node placement. This makes ! 90: slightly better layouts, but is only practical for graphs of a few ! 91: dozen nodes. ! 92: .PP ! 93: Output languages other than ! 94: .IR pic ! 95: are requested with \fB\-T\fP: \fB\-Tps\fP for PostScript, \fB\-Tsimple\fP ! 96: for a simple format similar to that of the Ninth Edition Unix \fIgraphdraw\fP ! 97: editor, and \fB\-Tcip\fP for a simplified form of \fIpic\fP code that ! 98: can be read by the obsolescent \fIcip\fP editor. PostScript drawings ! 99: are paginated by giving the \fB\-p\fP option to set page dimensions. ! 100: Default margins are one-half inch. ! 101: Although the margins can be set to zero, Laserwriters have hard margins ! 102: that prevent making seamless mosaics. ! 103: The \fB\-p\fP option replaces the \fIPoster\fP ! 104: program from CIA, which is inefficient for large drawings ! 105: because of quadratic behavior. ! 106: .PP ! 107: The \fB\-l\fP option disables automatic loading of the ! 108: .IR dag ! 109: graphics library. ! 110: .PP ! 111: A graph is drawn with left-to-right edges by using .GR ! 112: instead of .GS. The maximum height and width of the drawing may ! 113: be given on the .GS/.GR line. The optional keyword \fBfill\fP at ! 114: the end of this line makes \fIdag\fP adjust node positions ! 115: to fill the bounding box. ! 116: In-line graphics code such as \fIpic\fP or PostScript macros ! 117: may be defined in a block between \fB.PS\fP and \fB.PE\fP. ! 118: .PP ! 119: If \fIdag\fP is installed under EXPTOOLS, it uses the standard ! 120: \fBTOOLS\fP environment variable to find its libraries. ! 121: .SH "EXAMPLE" ! 122: .br ! 123: \&.GS 6 8 fill ! 124: .br ! 125: a b c; ! 126: .br ! 127: path a x y; ! 128: .br ! 129: draw nodes as Box; ! 130: .br ! 131: a z label "hi" weight 1000; ! 132: .br ! 133: draw edges dashed; ! 134: .br ! 135: b x; ! 136: .br ! 137: same rank b x; ! 138: .br ! 139: \&.GE ! 140: .br ! 141: .SH "BUGS" ! 142: \fItroff\fP doesn't have \fBdotted\fP or \fBdashed\fP splines. ! 143: Use PostScript. ! 144: .PP ! 145: \fIdag\fP doesn't keep edge labels from accidentally overlapping. ! 146: .SH "SEE ALSO" ! 147: .I ! 148: E. R. Gansner, S. C. North, K. P. Vo, "DAG \(em A Graph Drawing Program," ! 149: TM 59554-871019-04TM. ! 150: .br
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.