wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: Node Shapes wolffd@0: wolffd@0: wolffd@0: wolffd@0:

Node Shapes

wolffd@0:
wolffd@0: The geometries of all node shapes are affected by wolffd@0: the node attributes wolffd@0: fixedsize, wolffd@0: fontname, wolffd@0: fontsize, wolffd@0: height, wolffd@0: label, wolffd@0: style and wolffd@0: width. wolffd@0: wolffd@0:

Polygon-based Nodes

wolffd@0: The possible polygon-based shapes are displayed below. wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0:
wolffd@0: wolffd@0: wolffd@0: wolffd@0:
box wolffd@0: polygon wolffd@0: ellipse wolffd@0: circle wolffd@0:
wolffd@0: wolffd@0: wolffd@0: wolffd@0:
point wolffd@0: egg wolffd@0: triangle wolffd@0: plaintext wolffd@0:
wolffd@0: wolffd@0: wolffd@0: wolffd@0:
diamond wolffd@0: trapezium wolffd@0: parallelogram wolffd@0: house wolffd@0:
wolffd@0: wolffd@0: wolffd@0: wolffd@0:
pentagon wolffd@0: hexagon wolffd@0: septagon wolffd@0: octagon wolffd@0:
wolffd@0: wolffd@0: wolffd@0: wolffd@0:
doublecircle wolffd@0: doubleoctagon wolffd@0: tripleoctagon wolffd@0: invtriangle wolffd@0:
wolffd@0: wolffd@0: wolffd@0: wolffd@0:
invtrapezium wolffd@0: invhouse wolffd@0: Mdiamond wolffd@0: Msquare wolffd@0:
wolffd@0: wolffd@0: wolffd@0: wolffd@0:
Mcircle wolffd@0: rect wolffd@0: rectangle wolffd@0: none wolffd@0:
wolffd@0: wolffd@0: wolffd@0: wolffd@0:
note wolffd@0: tab wolffd@0: folder wolffd@0: box3d wolffd@0:
wolffd@0:
component wolffd@0:
wolffd@0: As the figures suggest, the shapes rect and rectangle are synonyms for box, and none is a synonym for plaintext. wolffd@0: Also, unlike the rest, we have shown these last two wolffd@0: without style=filled wolffd@0: to indicate the normal use. If fill were turned on, the label text would wolffd@0: appear in a filled rectangle. wolffd@0:

wolffd@0: The geometries of polygon-based shapes are also affected wolffd@0: by the node attributes wolffd@0: regular, wolffd@0: peripheries and wolffd@0: orientation. wolffd@0: If shape="polygon", the attributes wolffd@0: sides, wolffd@0: skew and wolffd@0: distortion are also used. wolffd@0: If unset, they default to 4, 0.0 and 0.0, respectively. wolffd@0: In addition, the 3 M* shapes support auxiliary labels using wolffd@0: the toplabel and wolffd@0: bottomlabel attributes. wolffd@0: On the other hand, the point shape is special in that it is wolffd@0: only affected by the peripheries, wolffd@0: width and wolffd@0: height attributes. wolffd@0: wolffd@0:

Record-based Nodes

wolffd@0: These are specified by shape values of "record" and "Mrecord". wolffd@0: The structure of a record-based node is determined by wolffd@0: its label, wolffd@0: which has the following schema: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0:
rlabel=field ( '|' field )*
where field=fieldId or '{' rlabel '}'
and fieldId= [ '<' string '>'] [ string ]
wolffd@0: Literal braces, vertical bars and angle brackets must be escaped. wolffd@0: Spaces are interpreted as separators between tokens, wolffd@0: so they must be escaped if you want spaces in the text. wolffd@0:

wolffd@0: The first string in fieldId assigns a portname to the field and can wolffd@0: be combined with the node name to indicate where to attach an edge wolffd@0: to the node. (See portPos.) wolffd@0: The second string is used as the text for the field; it supports the usual wolffd@0: escape sequences \n, \l and \r. wolffd@0:

wolffd@0: Visually, a record is a box, with fields represented by alternating wolffd@0: rows of horizontal or vertical subboxes. The Mrecord shape is identical wolffd@0: to a record shape, except that the outermost box has rounded corners. wolffd@0: Flipping between horizontal and vertical layouts is done by nesting wolffd@0: fields in braces "{...}". The top-level orientation in a record is wolffd@0: horizontal. Thus, a record with label "A | B | C | D" will have 4 fields wolffd@0: oriented left to right, while "{A | B | C | D}" will have them wolffd@0: from top to bottom and "A | { B | C } | D" will have "B" over "C", with wolffd@0: "A" to the left and "D" to the right of "B" and "C". wolffd@0:

wolffd@0: The initial orientation of a record node depends on the wolffd@0: rankdir attribute. If this attribute wolffd@0: is TB (the default) or TB, corresponding to vertical wolffd@0: layouts, the top-level fields in a record are displayed horizontally. wolffd@0: If, however, this attribute is LR or RL, wolffd@0: corresponding to horizontal layouts, the top-level fields are wolffd@0: displayed vertically. wolffd@0:

wolffd@0: As an example of a record node, the dot input wolffd@0:

wolffd@0: digraph structs { wolffd@0: node [shape=record]; wolffd@0: struct1 [label="<f0> left|<f1> mid\ dle|<f2> right"]; wolffd@0: struct2 [label="<f0> one|<f1> two"]; wolffd@0: struct3 [label="hello\nworld |{ b |{c|<here> d|e}| f}| g | h"]; wolffd@0: struct1:f1 -> struct2:f0; wolffd@0: struct1:f2 -> struct3:here; wolffd@0: } wolffd@0: wolffd@0: wolffd@0: yields the figure
wolffd@0: wolffd@0:

wolffd@0: If we add the line wolffd@0:

wolffd@0: rankdir=LR wolffd@0: wolffd@0: we get the layout
wolffd@0: wolffd@0:

wolffd@0: If we change node struct1 to have shape Mrecord, wolffd@0: it then looks like:
wolffd@0: wolffd@0: wolffd@0:

Styles for Nodes

wolffd@0: The style wolffd@0: attribute can be used to modify the appearance of a node. wolffd@0: At present, there are 8 style values recognized: wolffd@0: filled, invisible, diagonals, rounded. wolffd@0: dashed, dotted, solid and bold. wolffd@0: As usual, the value of the style wolffd@0: attribute can be a comma-separated list of any of these. If the wolffd@0: style contains conflicts (e.g, style="dotted, solid"), the last wolffd@0: attribute wins. wolffd@0:
wolffd@0:
filled wolffd@0:
This value indicates that the node's interior should be filled. wolffd@0: The color used is the node's fillcolor or, if that's not defined, its wolffd@0: color. For unfilled nodes, the interior of the node is transparent to wolffd@0: whatever color is the current graph or cluster background color. wolffd@0: Note that point shapes are always filled. wolffd@0:

wolffd@0: Thus, the code wolffd@0:

wolffd@0: digraph G { wolffd@0: rankdir=LR wolffd@0: node [shape=box, color=blue] wolffd@0: node1 [style=filled] wolffd@0: node2 [style=filled, fillcolor=red] wolffd@0: node0 -> node1 -> node2 wolffd@0: } wolffd@0: wolffd@0: yields the figure
wolffd@0: wolffd@0: wolffd@0:
invisible wolffd@0:
Setting this style causes the node not to be displayed at all. wolffd@0: Note that the node is still used in laying out the graph. wolffd@0: wolffd@0:
diagonals wolffd@0:
The diagonals style causes small chords to be drawn near the vertices wolffd@0: of the node's polygon or, in case of circles and ellipses, two chords near wolffd@0: the top and the bottom of the shape. The special node shapes wolffd@0: Msquare, wolffd@0: Mcircle, and wolffd@0: Mdiamond wolffd@0: are simply an ordinary square, circle and wolffd@0: diamond with the diagonals style set. wolffd@0: wolffd@0:
rounded wolffd@0:
The rounded style causes the polygonal corners to be smoothed. wolffd@0: Note that this style also applies to record-based nodes. Indeed, wolffd@0: the Mrecord shape is simply shorthand for setting this style. wolffd@0: Also, prior to 26 April 2005, the rounded and filled styles were wolffd@0: mutually exclusive. wolffd@0:

wolffd@0: As an example of rounding, dot uses the graph wolffd@0:

wolffd@0: digraph R { wolffd@0: rankdir=LR wolffd@0: node [style=rounded] wolffd@0: node1 [shape=box] wolffd@0: node2 [fillcolor=yellow, style="rounded,filled", shape=diamond] wolffd@0: node3 [shape=record, label="{ a | b | c }"] wolffd@0: wolffd@0: node1 -> node2 -> node3 wolffd@0: } wolffd@0: wolffd@0: to produce the figure
wolffd@0: wolffd@0:
dashed wolffd@0:
This style causes the node's border to be drawn as a dashed line. wolffd@0:
dotted wolffd@0:
This style causes the node's border to be drawn as a dotted line. wolffd@0:
solid wolffd@0:
This style causes the node's border to be drawn as a solid line, wolffd@0: which is the default. wolffd@0:
bold wolffd@0:
This style causes the node's border to be drawn as a bold line. wolffd@0: See also setlinewidth. wolffd@0: wolffd@0:
wolffd@0: wolffd@0:

wolffd@0: Additional styles may be available with a specific code generator. wolffd@0:

HTML-Like Labels

wolffd@0: wolffd@0: NOTE:This feature is only available on versions of Graphviz wolffd@0: that are newer than mid-November 2003. In particular, it is not part wolffd@0: of release 1.10. wolffd@0:

wolffd@0: If the value of a label attribute wolffd@0: (label for nodes, edges, clusters, and wolffd@0: graphs, and the wolffd@0: headlabel and wolffd@0: taillabel wolffd@0: attributes of an edge) is given as an wolffd@0: HTML string, wolffd@0: that is, delimited by <...> wolffd@0: rather than "...", wolffd@0: the label is interpreted as wolffd@0: an HTML description. At their simplest, such labels wolffd@0: can describe multiple lines of variously aligned text as provided by ordinary wolffd@0: string labels. More generally, the wolffd@0: label can specify a table similar to those provided by HTML, wolffd@0: with different graphical attributes at each level. wolffd@0:

wolffd@0: NOTE: The features and syntax supported by these labels are wolffd@0: modeled on HTML. However, there are many aspects that are relevant wolffd@0: to Graphviz labels that are not in HTML and, conversely, HTML allows wolffd@0: various constructs which are meaningless in Graphviz. We will generally wolffd@0: refer to these labels as "HTML labels" rather than the cumbersome wolffd@0: "HTML-like labels" but the reader is warned that these are not really wolffd@0: HTML. The grammar below describes precisely what Graphviz will accept. wolffd@0:

wolffd@0: Although HTML labels are not, strictly speaking, a shape, they can be wolffd@0: viewed as a generalization of the record shapes described above. wolffd@0: In particular, if a node has set its wolffd@0: shape wolffd@0: attribute to plaintext, the HTML label will be the node's wolffd@0: shape. On the other hand, if the node has any other shape (except wolffd@0: point), the HTML label will be embedded within the node the wolffd@0: same way an ordinary label would be. wolffd@0:

wolffd@0: The following is an abstract grammar for HTML labels. wolffd@0: Terminals, corresponding to elements, are shown in bold font, wolffd@0: and nonterminals in italics. wolffd@0: Square brackets [ and ] enclose optional items. wolffd@0: Vertical bars | separate alternatives. wolffd@0: Note that, as in HTML, element and attribute names are case-insensitive. wolffd@0: (cf. sections 3.2.1 and 3.2.2 of the wolffd@0: HTML 4.01 specification). wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0: wolffd@0:
label:text
|table
text:textitem
|text textitem
textitem:string
|<BR/>
|<FONT> text </FONT>
table:[ <FONT> ] <TABLE> rows </TABLE> [ </FONT> ]
rows:row
|rows row
row:<TR> cells </TR>
cells:cell
|cells cell
cell:<TD> label </TD>
|<TD> <IMG/> </TD>
wolffd@0:

wolffd@0: Above, a string is any collection of printable characters, including wolffd@0: all spaces. Note that outside of the body of a <TD> element, wolffd@0: whitespace characters are ignored; within a <TD> element, spaces wolffd@0: are preserved but all other white space characters are discarded. wolffd@0: HTML comments are allowed within an HTML string. They can occur anywhere wolffd@0: provided that, if they contain part of an HTML element, they must contain wolffd@0: the entire element. wolffd@0:

wolffd@0: As is obvious from the above description, the interpretation of white space wolffd@0: characters is one place where HTML-like labels is very different from wolffd@0: standard HTML. In HTML, any sequence of white space characters is wolffd@0: collapsed to a single space, If the user does not want this to happen, the wolffd@0: input must use non-breaking spaces "&nbsp;". This makes sense in wolffd@0: HTML, where text layout depends dynamically on the space available. In wolffd@0: Graphviz, the layout is statically determined by the input, so it is wolffd@0: reasonable to treat ordinary space characters as non-breaking. In addition, wolffd@0: ignoring tabs and newlines allows the input text to be formatted for wolffd@0: easier reading. wolffd@0:

wolffd@0: Each of the HTML elements has a set of optional attributes. wolffd@0: Attribute values must appear in double quotes. wolffd@0:

<TABLE
wolffd@0:   ALIGN="CENTER|LEFT|RIGHT"
wolffd@0:   BGCOLOR="color"
wolffd@0:   BORDER="value"
wolffd@0:   CELLBORDER="value"
wolffd@0:   CELLPADDING="value"
wolffd@0:   CELLSPACING="value"
wolffd@0:   COLOR="color"
wolffd@0:   FIXEDSIZE="FALSE|TRUE"
wolffd@0:   HEIGHT="value"
wolffd@0:   HREF="value"
wolffd@0:   PORT="portName"
wolffd@0:   TARGET="value"
wolffd@0:   TITLE="value"
wolffd@0:   TOOLTIP="value"
wolffd@0:   VALIGN="MIDDLE|BOTTOM|TOP"
wolffd@0:   WIDTH="value"
wolffd@0: >
wolffd@0: 
wolffd@0:

wolffd@0:

<TR
wolffd@0:   <!-- No attributes -->
wolffd@0: >
wolffd@0: 
wolffd@0:

wolffd@0:

<TD
wolffd@0:   ALIGN="CENTER|LEFT|RIGHT|TEXT"
wolffd@0:   BALIGN="CENTER|LEFT|RIGHT"
wolffd@0:   BGCOLOR="color"
wolffd@0:   BORDER="value"
wolffd@0:   CELLPADDING="value"
wolffd@0:   CELLSPACING="value"
wolffd@0:   COLOR="color"
wolffd@0:   COLSPAN="value"
wolffd@0:   FIXEDSIZE="FALSE|TRUE"
wolffd@0:   HEIGHT="value"
wolffd@0:   HREF="value"
wolffd@0:   PORT="portName"
wolffd@0:   ROWSPAN="value"
wolffd@0:   TARGET="value"
wolffd@0:   TITLE="value"
wolffd@0:   TOOLTIP="value"
wolffd@0:   VALIGN="MIDDLE|BOTTOM|TOP"
wolffd@0:   WIDTH="value"
wolffd@0: >
wolffd@0: 
wolffd@0: wolffd@0:

wolffd@0:

<FONT
wolffd@0:   COLOR="color"
wolffd@0:   FACE="fontname"
wolffd@0:   POINT-SIZE="value"
wolffd@0: >
wolffd@0: 
wolffd@0: wolffd@0:

wolffd@0:

<BR
wolffd@0:   ALIGN="CENTER|LEFT|RIGHT"
wolffd@0: >
wolffd@0: 
wolffd@0: wolffd@0:

wolffd@0:

<IMG
wolffd@0:   SCALE="FALSE|TRUE|WIDTH|HEIGHT|BOTH"
wolffd@0:   SRC="value"
wolffd@0: >
wolffd@0: 
wolffd@0: wolffd@0:

wolffd@0: ALIGN wolffd@0:

wolffd@0: specifies horizontal placement. When an object is allocated wolffd@0: more space than required, this value determines where the extra space wolffd@0: is placed left and right of the object. wolffd@0:

wolffd@0:

wolffd@0:

wolffd@0: The contents of a cell are normally aligned as a block. In particular, wolffd@0: lines of text are first aligned as a text block based on the width of wolffd@0: the widest line and the corresponding <BR> elements. Then, wolffd@0: the entire text block is aligned within a cell. If, however, the wolffd@0: cell's ALIGN value is "TEXT", and the cell contains wolffd@0: lines of text, then the lines are justified using the entire available wolffd@0: width of the cell. If the cell does not contain text, then the contained wolffd@0: image or table is centered. wolffd@0:

wolffd@0: wolffd@0: BALIGN wolffd@0:
wolffd@0: specifies the default alignment of <BR> elements contained wolffd@0: in the cell. That is, if a <BR> element has no wolffd@0: explicit ALIGN attribute, the attribute value is specified wolffd@0: by the value of BALIGN. wolffd@0:
wolffd@0: wolffd@0: BGCOLOR="color" wolffd@0:
wolffd@0: sets the color of the background. This color can be wolffd@0: overridden by a BGCOLOR attribute in descendents. wolffd@0:
wolffd@0: wolffd@0: BORDER="value" wolffd@0:
wolffd@0: specifies the width of the border around the object in points. wolffd@0: A value of zero indicates no border. The default is 1. wolffd@0: The maximum value is 255. wolffd@0: If set in a table, and CELLBORDER is not set, wolffd@0: this value is also used for all cells in the table. wolffd@0: It can be overridden by a BORDER tag in a cell. wolffd@0:
wolffd@0: wolffd@0: CELLBORDER="value" wolffd@0:
wolffd@0: specifies the width of the border for all cells in a table. wolffd@0: It can be overridden by a BORDER tag in a cell. wolffd@0: The maximum value is 255. wolffd@0:
wolffd@0: wolffd@0: CELLPADDING="value" wolffd@0:
wolffd@0: specifies the space, in points, between a cell's border and its content. wolffd@0: The default is 2. wolffd@0: The maximum value is 255. wolffd@0:
wolffd@0: wolffd@0: CELLSPACING="value" wolffd@0:
wolffd@0: specifies the space, in points, between cells in a table and between wolffd@0: a cell and the table's border. The default is 2. wolffd@0: The maximum value is 127. wolffd@0:
wolffd@0: wolffd@0: COLOR="color" wolffd@0:
wolffd@0: sets the color of the font within the scope of wolffd@0: <FONT>...</FONT>, or the border color wolffd@0: of the table or cell within the scope of wolffd@0: <TABLE>...</TABLE>, wolffd@0: or <TD>...</TD>. wolffd@0: This color can be wolffd@0: overridden by a COLOR attribute in descendents. wolffd@0: By default, the font color is determined by the wolffd@0: fontcolor attribute of wolffd@0: the corresponding node, edge or graph, and the border color wolffd@0: is determined by the wolffd@0: color attribute of wolffd@0: the corresponding node, edge or graph. wolffd@0:
wolffd@0: wolffd@0: COLSPAN="value" wolffd@0:
wolffd@0: specifies the number of columns spanned by the cell. The default is 1. wolffd@0: The maximum value is 65535. wolffd@0:
wolffd@0: wolffd@0: FACE="fontname" wolffd@0:
wolffd@0: specifies the font to use within the scope of wolffd@0: <FONT>...</FONT>. wolffd@0: This can be wolffd@0: overridden by a FACE attribute in descendents. wolffd@0: By default, the font name is determined by the wolffd@0: fontname attribute of the corresponding wolffd@0: node, edge or graph. wolffd@0:
wolffd@0: wolffd@0: FIXEDSIZE wolffd@0:
wolffd@0: specifies whether the values given by the WIDTH wolffd@0: and HEIGHT attributes are enforced. wolffd@0:

wolffd@0:

wolffd@0:
wolffd@0: wolffd@0: HEIGHT="value" wolffd@0:
wolffd@0: specifies the mininum height, in points, of the object. The height wolffd@0: includes the contents, any spacing and the border. Unless wolffd@0: FIXEDSIZE is true, the height will be expanded to allow wolffd@0: the contents to fit. wolffd@0: The maximum value is 65535. wolffd@0:
wolffd@0: wolffd@0: HREF="value" wolffd@0:
wolffd@0: attaches a URL to the object. wolffd@0:
wolffd@0: wolffd@0: POINT-SIZE="value" wolffd@0:
wolffd@0: sets the size of the font, in points, used within the scope of wolffd@0: <FONT>...</FONT>. wolffd@0: This can be wolffd@0: overridden by a POINT-SIZE attribute in descendents. wolffd@0: By default, the font size is determined by the wolffd@0: fontsize attribute of the corresponding wolffd@0: node, edge or graph. wolffd@0:
wolffd@0: wolffd@0: PORT="value" wolffd@0:
wolffd@0: attaches a portname to the object. wolffd@0: (See portPos.) wolffd@0: This can be used to modify the head wolffd@0: or tail of an edge, so that the end attaches directly to the object. wolffd@0:
wolffd@0: wolffd@0: ROWSPAN="value" wolffd@0:
wolffd@0: specifies the number of rows spanned by the cell. The default is 1. wolffd@0: The maximum value is 65535. wolffd@0:
wolffd@0: wolffd@0: SCALE wolffd@0:
wolffd@0: specifies how an image will use any extra space available in its cell. wolffd@0: Allowed values are wolffd@0: wolffd@0: If this attribute is undefined, wolffd@0: the image inherits the imagescale wolffd@0: attribute of the graph object being drawn. wolffd@0: As with the imagescale wolffd@0: attribute, if the cell has a fixed size and the image is too large, wolffd@0: any offending dimension will be shrunk to fit the space, the wolffd@0: scaling being uniform in width and height if SCALE="true". wolffd@0:
wolffd@0: wolffd@0: SRC="value" wolffd@0:
wolffd@0: specifies the image file to be displayed in the cell. wolffd@0: Note that if the software is used as a web server, file system access wolffd@0: to images is more restricted. See GV_FILE_PATH wolffd@0: and SERVER_NAME. wolffd@0:
wolffd@0: wolffd@0: TARGET="value" wolffd@0:
wolffd@0: determines which window of the browser is used for the URL if the object wolffd@0: has one. wolffd@0: See W3C documentation. wolffd@0:
wolffd@0: wolffd@0: TITLE="value" wolffd@0:
wolffd@0: sets the tooltip annotation attached to the element. wolffd@0: This is used only if the element has a HREF attribute. wolffd@0:
wolffd@0: wolffd@0: TOOLTIP="value" wolffd@0:
wolffd@0: is an alias for TITLE. wolffd@0:
wolffd@0: wolffd@0:

wolffd@0: VALIGN wolffd@0:

wolffd@0: specifies vertical placement. When an object is allocated wolffd@0: more space than required, this value determines where the extra space wolffd@0: is placed above and below the object. wolffd@0:

wolffd@0:

wolffd@0:
wolffd@0: wolffd@0: WIDTH="value" wolffd@0:
wolffd@0: specifies the mininum width, in points, of the object. The width wolffd@0: includes the contents, any spacing and the border. Unless wolffd@0: FIXEDSIZE is true, the width will be expanded to allow wolffd@0: the contents to fit. wolffd@0: The maximum value is 65535. wolffd@0:
wolffd@0: wolffd@0:

wolffd@0: There is some inheritance among the attributes. If a table specifies wolffd@0: a CELLPADDING, CELLBORDER or BORDER wolffd@0: value, this value is used by the table's wolffd@0: cells unless overridden. If a cell or table specifies a BGCOLOR, wolffd@0: this will be the background color for all of its descendents. wolffd@0: Of course, if a background or fill color is specified for the wolffd@0: graph object owning the label, this will be the original wolffd@0: background for the label. wolffd@0: The object's fontname, fontcolor and fontsize attributes wolffd@0: are the default for drawing text. These can be overridden by using wolffd@0: FONT to set new values. The new font values will hold wolffd@0: until overridden by an enclosed FONT element. wolffd@0: Finally, the pencolor or color of the graph object will be used as wolffd@0: the border color. wolffd@0:

wolffd@0: Because of certain limitations in handling tables in a device-independent wolffd@0: manner, when BORDER is 1 and both table and cell borders wolffd@0: are on and CELLSPACING is less than 2, anomalies can arise wolffd@0: in the output, such as gaps between sides of borders which should be wolffd@0: abutting or even collinear. The user can usual get around this by increasing wolffd@0: the border size or the spacing, or turning off the table border. wolffd@0:

wolffd@0: As an example of HTML labels, the dot input wolffd@0:

wolffd@0: digraph structs { wolffd@0: node [shape=plaintext] wolffd@0: struct1 [label=< wolffd@0: <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> wolffd@0: <TR><TD>left</TD><TD PORT="f1">mid dle</TD><TD PORT="f2">right</TD></TR> wolffd@0: </TABLE>>]; wolffd@0: struct2 [label=< wolffd@0: <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0"> wolffd@0: <TR><TD PORT="f0">one</TD><TD>two</TD></TR> wolffd@0: </TABLE>>]; wolffd@0: struct3 [label=< wolffd@0: <TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" CELLPADDING="4"> wolffd@0: <TR> wolffd@0: <TD ROWSPAN="3">hello<BR/>world</TD> wolffd@0: <TD COLSPAN="3">b</TD> wolffd@0: <TD ROWSPAN="3">g</TD> wolffd@0: <TD ROWSPAN="3">h</TD> wolffd@0: </TR> wolffd@0: <TR> wolffd@0: <TD>c</TD><TD PORT="here">d</TD><TD>e</TD> wolffd@0: </TR> wolffd@0: <TR> wolffd@0: <TD COLSPAN="3">f</TD> wolffd@0: </TR> wolffd@0: </TABLE>>]; wolffd@0: struct1:f1 -> struct2:f0; wolffd@0: struct1:f2 -> struct3:here; wolffd@0: } wolffd@0: wolffd@0: produces the HTML analogue of the record example above
wolffd@0: wolffd@0:

wolffd@0: As usual, an HTML specification is more verbose. On the other hand, wolffd@0: HTML labels are much more general, as the following example shows: wolffd@0:

wolffd@0: wolffd@0:

wolffd@0: The source for this graph can be found here. wolffd@0:

wolffd@0: Here is an example using <FONT> elements wolffd@0:

wolffd@0: wolffd@0:

wolffd@0: with the input graph. wolffd@0:

wolffd@0: Here is an example using an <IMG> element wolffd@0:

wolffd@0: wolffd@0:

wolffd@0: with the input graph. wolffd@0: wolffd@0:

User-defined Nodes

wolffd@0: wolffd@0: There is a third type of node shape which is specified by the user. wolffd@0: Typically, these shapes rely on the details of a concrete graphics wolffd@0: format. At present, shapes can be described using PostScript, via a wolffd@0: file or add-on library, for use in PostScript output, or shapes can wolffd@0: be specified by a bitmap-image file for use with SVG or bitmap (jpeg, wolffd@0: gif, etc.) output. More information can be found on the page wolffd@0: wolffd@0: How to create custom shapes. wolffd@0: wolffd@0:

SDL Shapes for PostScript

wolffd@0: One example of user-defined node shapes is provided by Mark Rison of CSR. wolffd@0: These are the SDL shapes. wolffd@0: These are available as PostScript functions whose use is described in wolffd@0: External PostScript procedures. wolffd@0: The necessary PostScript library file and sample use can be found in the wolffd@0: contrib/sdlshapes directory in the release. Please note the wolffd@0: COPYRIGHT AND PERMISSION NOTICE contained in the library file sdl.ps. wolffd@0:

wolffd@0: The table below wolffd@0: gives the shape names and the corresponding node shapes. wolffd@0: wolffd@0: wolffd@0: