Package yapgvb :: Class Edge
[show private | hide private]
[frames | no frames]

Class Edge


Edges are created either through the GraphBase.add_node, or by using the overloaded Node operators <<, >> , and - operators (for directed, directed, and undirected graphs respectively).
Method Summary
  __iter__(self)
Iterates over (tail, head)

Property Summary
string arrowhead: Style of arrowhead on the head node of an edge.
float arrowsize: Multiplicative scale factor for arrowheads.
string arrowtail: Style of arrowhead on the tail node of an edge.
str color: Basic drawing color for graphics, not text.
str colorscheme: This attribute specifies a color scheme namespace.
str comment: Comments are inserted into output.
boolean constraint: If false, the edge is not used in ranking the nodes.
boolean decorate: If true, attach edge label to edge by a 2-segment polyline, underlining the label, then going to the closest point of spline.
string dir: Set edge type for drawing arrowheads.
str fontcolor: Color used for text.
str fontname: Font used for text.
float fontsize: Font size, in points, used for text.
  graph
  head: The edge's head (source) node
boolean headclip: If true, the head of an edge is clipped to the boundary of the head node; otherwise, the end of the edge goes to the center of the node, or the center of a port, if applicable.
str headhref: Synonym for headURL.
str headlabel: Text label to be placed near head of edge.
string headport: Indicates where on the head node to attach the head of the edge.
str headtarget: If the edge has a headURL, this attribute determines which window of the browser is used for the URL.
str headtooltip: Tooltip annotation attached to the head of an edge.
str headURL: For the output format imap or cmap, if headURL is defined, it is output as part of the head label of the edge.
str href: Synonym for URL.
str label: Text label attached to objects.
float labelangle: This, along with labeldistance, determine where the headlabel (taillabel) are placed with respect to the head (tail) in polar coordinates.
float labeldistance: Multiplicative scaling factor adjusting the distance that the headlabel(taillabel) is from the head(tail) node.
boolean labelfloat: If true, allows edge labels to be less constrained in position.
str labelfontcolor: Color used for headlabel and taillabel.
str labelfontname: Font used for headlabel and taillabel.
float labelfontsize: Font size, in points, used for headlabel and taillabel.
str layer: Specifies layers in which the node or edge is present.
float len: Preferred edge length, in inches.
str lhead: Logical head of an edge.
(x,y) or (x,y,z) tuple lp: Label position, in points.
str ltail: Logical tail of an edge.
int minlen: Minimum edge length (rank difference between head and tail).
boolean nojustify: By default, the justification of multi-line labels is done within the largest context that makes sense.
object pos: Position of node, or spline control points, in points.
str samehead: Edges with the same head and the same samehead value are aimed at the same point on the head.
str sametail: Edges with the same tail and the same sametail value are aimed at the same point on the tail.
int showboxes: Print guide boxes in PostScript at the beginning of routesplines if 1, or at the end if 2.
str style: Set style for node or edge.
  tail: The edge's tail (destination) node
boolean tailclip: If true, the tail of an edge is clipped to the boundary of the tail node; otherwise, the end of the edge goes to the center of the node, or the center of a port, if applicable.
str tailhref: Synonym for tailURL.
str taillabel: Text label to be placed near tail of edge.
string tailport: Indicates where on the tail node to attach the tail of the edge.
str tailtarget: If the edge has a tailURL, this attribute determines which window of the browser is used for the URL.
str tailtooltip: Tooltip annotation attached to the tail of an edge.
str tailURL: When the output format is imap or cmap, if tailURL is defined, it is output as part of the tail label of the edge.
str target: If the object has a URL, this attribute determines which window of the browser is used for the URL.
str tooltip: Tooltip annotation attached to the node or edge.
  URL: Hyperlinks incorporated into device-dependent output.
float weight: Weight of edge.

Method Details

__iter__(self)

Iterates over (tail, head)

Property Details

arrowhead

Style of arrowhead on the head node of an edge. See also the dir attribute, and a limitation.

Possible values: 'normal', 'inv', 'dot', 'invdot', 'odot', 'invodot', 'none', 'tee', 'empty', 'invempty', 'diamond', 'odiamond', 'ediamond', 'crow', 'box', 'obox', 'open', 'halfopen', 'vee'

arrowsize

Multiplicative scale factor for arrowheads.

arrowtail

Style of arrowhead on the tail node of an edge. See also the dir attribute, and a limitation.

Possible values: 'normal', 'inv', 'dot', 'invdot', 'odot', 'invodot', 'none', 'tee', 'empty', 'invempty', 'diamond', 'odiamond', 'ediamond', 'crow', 'box', 'obox', 'open', 'halfopen', 'vee'

color

Basic drawing color for graphics, not text. For the latter, use the fontcolor attribute.

For edges, the value can either be a single color or a colorList. In the latter case, the edge is drawn using parallel splines or lines, one for each color in the list, in the order given. The head arrow, if any, is drawn using the first color in the list, and the tail arrow, if any, the second color. This supports the common case of drawing opposing edges, but using parallel splines instead of separately routed multiedges. For example, the graph

digraph G { a -> b [dir=both color="red:blue"] }

yields

colorscheme

This attribute specifies a color scheme namespace. If defined, it specifies the context for interpreting color names. In particular, if a color value has form "xxx" or "//xxx", then the color xxx will be evaluated according to the current color scheme. If no color scheme is set, the standard X11 naming is used. For example, if colorscheme=bugn9, then color=7 is interpreted as "/bugn9/7".

comment

Comments are inserted into output. Device-dependent

constraint

If false, the edge is not used in ranking the nodes. For example, in the graph

digraph G { a -> c; a -> b; b -> c [constraint=false]; }

the edge b -> c does not add a constraint during rank assignment, so the only constraints are that a be above b and c, yielding the graph:

decorate

If true, attach edge label to edge by a 2-segment polyline, underlining the label, then going to the closest point of spline.

dir

Set edge type for drawing arrowheads. This indicates which ends of the edge should be decorated with an arrowhead. The actual style of the arrowhead can be specified using the arrowhead and arrowtail attributes. See limitation.

dirtype description

fontcolor

Color used for text.

fontname

Font used for text. This very much depends on the output format and, for non-bitmap output such as PostScript or SVG, the availability of the font when the graph is displayed or printed. As such, it is best to rely on font faces that are generally available, such as Times-Roman, Helvetica or Courier.

If Graphviz was built using the fontconfig library, the latter library will be used to search for the font. However, if the fontname string contains a slash character "/", it is treated as a pathname for the font file, though font lookup will append the usual font suffixes.

If Graphviz does not use fontconfig, fontname will be considered the name of a Type 1 or True Type font file. If you specify fontname=schlbk, the tool will look for a file named schlbk.ttf or schlbk.pfa or schlbk.pfb in one of the directories specified by the fontpath attribute. The lookup does support various aliases for the common fonts.

fontsize

Font size, in points, used for text.

head

The edge's head (source) node

headclip

If true, the head of an edge is clipped to the boundary of the head node; otherwise, the end of the edge goes to the center of the node, or the center of a port, if applicable.

headhref

Synonym for headURL.

headlabel

Text label to be placed near head of edge. See limitation.

headport

Indicates where on the head node to attach the head of the edge. In the default case, the edge is aimed towards the center of the node, and then clipped at the node boundary. See limitation.

Possible values: 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw', 'center'

headtarget

If the edge has a headURL, this attribute determines which window of the browser is used for the URL. Setting it to "_graphviz" will open a new window if it doesn't already exist, or reuse it if it does. If undefined, the value of the target is used.

headtooltip

Tooltip annotation attached to the head of an edge. This is used only if the edge has a headURL attribute.

headURL

For the output format imap or cmap, if headURL is defined, it is output as part of the head label of the edge. See limitation.

href

Synonym for URL.

label

Text label attached to objects. If a node's shape is record, then the label can have a special format which describes the record layout.

labelangle

This, along with labeldistance, determine where the headlabel (taillabel) are placed with respect to the head (tail) in polar coordinates. The origin in the coordinate system is the point where the edge touches the node. The ray of 0 degrees goes from the origin back along the edge, parallel to the edge at the origin.

The angle, in degrees, specifies the rotation from the 0 degree ray, with positive angles moving counterclockwise and negative angles moving clockwise.

labeldistance

Multiplicative scaling factor adjusting the distance that the headlabel(taillabel) is from the head(tail) node. The default distance is 10 points. See labelangle for more details.

labelfloat

If true, allows edge labels to be less constrained in position. In particular, it may appear on top of other edges.

labelfontcolor

Color used for headlabel and taillabel. If not set, defaults to edge's fontcolor.

labelfontname

Font used for headlabel and taillabel. If not set, defaults to edge's fontname.

labelfontsize

Font size, in points, used for headlabel and taillabel. If not set, defaults to edge's fontsize.

layer

Specifies layers in which the node or edge is present.

len

Preferred edge length, in inches.

lhead

Logical head of an edge. When compound is true, if lhead is defined and is the name of a cluster containing the real head, the edge is clipped to the boundary of the cluster. See limitation.

lp

Label position, in points.

ltail

Logical tail of an edge. When compound is true, if ltail is defined and is the name of a cluster containing the real tail, the edge is clipped to the boundary of the cluster. See limitation.

minlen

Minimum edge length (rank difference between head and tail).

nojustify

By default, the justification of multi-line labels is done within the largest context that makes sense. Thus, in the label of a polygonal node, a left-justified line will align with the left side of the node (shifted by the prescribed margin). In record nodes, left-justified line will line up with the left side of the enclosing column of fields. If nojustify is "true", multi-line labels will be justified in the context of itself. For example, if the attribute is set, the first label line is long, and the second is shorter and left-justified, the second will align with the left-most character in the first line, regardless of how large the node might be.

pos

Position of node, or spline control points, in points. In neato and fdp, pos can be used to set initial position of a node. Concerning this, see the -s command line flag.

samehead

Edges with the same head and the same samehead value are aimed at the same point on the head. See limitation.

sametail

Edges with the same tail and the same sametail value are aimed at the same point on the tail. See limitation.

showboxes

Print guide boxes in PostScript at the beginning of routesplines if 1, or at the end if 2. (Debugging)

style

Set style for node or edge. For cluster subgraph, if "filled", the cluster box's background is filled.

tail

The edge's tail (destination) node

tailclip

If true, the tail of an edge is clipped to the boundary of the tail node; otherwise, the end of the edge goes to the center of the node, or the center of a port, if applicable.

tailhref

Synonym for tailURL.

taillabel

Text label to be placed near tail of edge. See limitation.

tailport

Indicates where on the tail node to attach the tail of the edge. See limitation.

Possible values: 'n', 'ne', 'e', 'se', 's', 'sw', 'w', 'nw', 'center'

tailtarget

If the edge has a tailURL, this attribute determines which window of the browser is used for the URL. Setting it to "_graphviz" will open a new window if it doesn't already exist, or reuse it if it does. If undefined, the value of the target is used.

tailtooltip

Tooltip annotation attached to the tail of an edge. This is used only if the edge has a tailURL attribute.

tailURL

When the output format is imap or cmap, if tailURL is defined, it is output as part of the tail label of the edge. See limitation.

target

If the object has a URL, this attribute determines which window of the browser is used for the URL. See W3C documentation.

tooltip

Tooltip annotation attached to the node or edge. If unset, Graphviz will use the object's label if defined. Note that if the label is a record specification or an HTML-like label, the resulting tooltip may be unhelpful. In this case, if tooltips will be generated, the user should set a tooltip attribute explicitly.

URL

Hyperlinks incorporated into device-dependent output. At present, used in ps2, cmap, i*map and svg formats. For all these formats, URLs can be attached to nodes, edges and clusters. URL attributes can also be attached to the root graph in ps2, cmap and i*map formats. This serves as the base URL for relative URLs in the former, and as the default image map file in the latter.

The active area for a node or cluster is its bounding box. For edges, the active areas are small circles where the edge contacts its head and tail nodes. These areas may overlap the related node, and the edge URL dominates. If the edge has a label, this will also be active. Finally, if the edge has a head or tail label, this will also be active. Note, however, that if the edge has a headURL attribute, it is this value that is used near the head node and on the head label, if defined. The similar restriction holds when tailURL is defined.

The URL of the root graph is only treated as an escString if the output format is cmap.

weight

Weight of edge. In dot, the heavier the weight, the shorter, straighter and more vertical the edge is. In neato, the heavier the weight, the more neato will try to place the end points so that the length of the edge is len.

Generated by Epydoc 2.1 on Tue Feb 21 14:34:48 2006 http://epydoc.sf.net