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

Class GraphBase

Known Subclasses:
Digraph, Graph

GraphBase is the base class for Graph and Digraph. GraphBase should not be instantiated directly.
Method Summary
  __init__(self, *args, **keywords)
GraphBase is a base class used by Graph and Digraph.
    Graph Definition
  add_node(self, name, **attributes)
Add a node to the graph.
  add_edge(self, tail, head)
Create an edge between two nodes.
    Layout and Rendering
  layout(self, engine, rendering_context)
Process the graph with one of the layout engines supplied by Graphviz.
    I/O
  render(self, outstream, format, rendering_context)
Render the graph to a file.
  write(self, output_stream_or_filename)
Output the graph in the dot language format.
  read(cls, input_stream_or_filename)
Read a graph from a dot file. (Class method)
    Boost.Graph Compatibility
  from_bgl(cls, bgraph, node_properties, edge_properties)
Translate a boost.python graph into a yapgvb graph. (Class method)
  to_bgl(ygraph, node_properties, edge_properties)
Translate a graphviz graph into a boost.python graph.

Property Summary
rect bb: Bounding box of drawing in integer points.
str bgcolor: When attached to the root graph, this color is used as the background for entire canvas.
boolean center: If true, the drawing is centered in the output canvas.
str charset: Specifies the character encoding used when interpreting string input as a text label.
string clusterrank: Mode used for handling clusters.
str colorscheme: This attribute specifies a color scheme namespace.
str comment: Comments are inserted into output.
boolean compound: If true, allow edges between clusters.
boolean concentrate: If true, use edge concentrators.
float Damping: Factor damping force motions.
float defaultdist: This specifies the distance between nodes in separate connected components.
int dim: Set the number of dimensions used for the layout.
  directed: True if directed, False if not.
float dpi: This specifies the expected number of pixels per inch on a display device.
float epsilon: Terminating condition.
str fontcolor: Color used for text.
str fontname: Font used for text.
str fontpath: Directory list used by libgd to search for bitmap fonts if Graphviz was not built with the fontconfig library.
float fontsize: Font size, in points, used for text.
  graph: graph to which this belongs (parent, if a subgraph, otherwise self)
float K: Spring constant used in virtual physical model.
str label: Text label attached to objects.
str labeljust: Justification for cluster labels.
str labelloc: Top/bottom placement of graph and cluster labels.
boolean landscape: If true, the graph is rendered in landscape mode.
str layers: Specifies a linearly ordered list of layer names attached to the graph The graph is then output in separate layers.
str layersep: Specifies the separator characters used to split the layers attribute into a list of layer names.
float levelsgap: Specifies strictness of level constraints in neato when mode="hier".
(x,y) or (x,y,z) tuple lp: Label position, in points.
float margin: For graphs, this sets x and y margins of canvas, in inches.
int maxiter: Sets the number of iterations used.
float mclimit: Multiplicative scale factor used to alter the MinQuit (default = 8) and MaxIter (default = 24) parameters used during crossing minimization.
float mindist: Specifies the minimum separation between all nodes.
str mode: Technique for optimizing the layout.
str model: This value specifies how the distance matrix is computed for the input graph.
float nodesep: Minimum space between two adjacent nodes in the same rank, in inches.
boolean nojustify: By default, the justification of multi-line labels is done within the largest context that makes sense.
boolean normalize: If set, normalize coordinates of final layout so that the first point is at the origin, and then rotate the layout so that the first edge is horizontal.
float nslimit
float nslimit1
str ordering: If "out" for a graph G, and n is a node in G, then edges n->* appear left-to-right in the same order in which they are defined.
str orientation: Angle, in degrees, used to rotate node shapes.
string outputorder: Specify order in which nodes and edges are drawn.
str overlap: Determines if and how node overlaps should be removed.
boolean pack: This is true if the value of pack is "true" (case-insensitive) or a non-negative integer.
string packmode: This indicates the granularity and method used for packing (cf.
pointf page: Width and height of output pages, in inches.
string pagedir: If the page attribute is set and applicable, this attribute specifies the order in which the pages are emitted.
float quantum: If quantum > 0.0, node label dimensions will be rounded to integral multiples of the quantum.
string rankdir: Sets direction of graph layout.
float ranksep: In dot, this the gives desired rank separation, in inches.
float ratio: Sets the aspect ratio (drawing height/drawing width) for the drawing.
boolean remincross: If true and there are multiple clusters, run cross minimization a second time.
float resolution: This is a synonym for the dpi attribute.
str root: This specifies nodes to be used as the center of the layout and the root of the generated spanning tree.
int rotate: If 90, set drawing orientation to landscape.
int samplepoints: If the input graph defines the vertices attribute, and output is dot or xdot, this give the number of points used to represent circles and ellipses.
int searchsize: During network simplex, maximum number of edges with negative cut values to search when looking for one with minimum cut value.
float sep: Fraction to increase polygons (multiply coordinates by 1 + sep) for purposes of determining overlap.
int showboxes: Print guide boxes in PostScript at the beginning of routesplines if 1, or at the end if 2.
pointf size: Maximum width and height of drawing, in inches.
str splines: Controls how, and if, edges are represented.
string start: Parameter used to determine the initial layout of nodes.
  strict: True if strict, False if not.
str stylesheet: A URL or pathname specifying an XML style sheet, used in SVG output.
str target: If the object has a URL, this attribute determines which window of the browser is used for the URL.
boolean truecolor: If set explicitly to true or false, the value determines whether or not internal bitmap rendering relies on a truecolor color model or uses a color palette.
  URL: Hyperlinks incorporated into device-dependent output.
str viewport: Clipping window on final drawing.
float voro_margin
    Graph Traversal
  nodes: An iterator over all nodes in the graph
  edges: An iterator of edges contained in the graph.

Instance Method Details

add_node(self, name=None, **attributes)

Add a node to the graph. If a node of this name exists already, it will be returned and no new node will be created. If no name is specified, a random (and probably unique) name will be assigned. The keyword arguments are (attribute_name, value) pairs; this is a shorthand equivalent to assigning attributes individually:

n = mygraph.add_node('node_name', label="Hello World", fontsize=48)

is equivalent to:

n = mygraph.add_node('node_name') n.label = 'Hello World' n.fontsize = 48

add_edge(self, tail, head)

Create an edge between two nodes. Returns the created edge object.

layout(self, engine, rendering_context=None)

Process the graph with one of the layout engines supplied by Graphviz.
Parameters:
engine - Name of the layout engine. Possible values are 'fdp', 'twopi', 'neato', 'dot', 'circo'.
rendering_context - Leave this as None for now. It will be explained when I have time to write more documentation ;-)

render(self, outstream=<epydoc.imports._DevNull instance at 0x2aaaab84b320>, format=None, rendering_context=None)

Render the graph to a file. layout must be called prior to rendering.
Parameters:
outstream - Either a filename or an open, writable file stream.
format - Desired file format. One of 'pic', 'jpg', 'ismap', 'gd', 'hpgl', 'ps2', 'plain-ext', 'wbmp', 'ps', 'mif', 'gif', 'canoncmap', 'fig', 'pcl', 'vtx', 'vrml', 'svgz', 'gd2', 'xdot', 'jpeg', 'cmapx', 'imap', 'png', 'plain', 'dia', 'mp', 'svg', 'dot'.
rendering_context - Leave this as None for now. It will be explained when I have time to write more documentation ;-)

Attention: If you're writing a binary format, be sure to open outstream as a binary stream.

Note: If format is None (the default) and outstream is a filename, render will attempt to infer the correct format from the filename extension.

write(self, output_stream_or_filename=<epydoc.imports._DevNull instance at 0x2aaaab84b320>)

Output the graph in the dot language format. To render as an image, use the render() method. To read a dot file, use the __init__ constructor or the read() classmethod.

to_bgl(ygraph, node_properties=[], edge_properties=[])

Translate a graphviz graph into a boost.python graph.

The returned translation_map behaves like a dictionary of all corresponding (boost_edge, yapgvb_edge), (yapgvb_edge, boost_edge), (boost_vertex, yapgvb_node), and (yapgvb_node, boost_vertex) key/value pairs.
Parameters:
node_properties - A list of strings naming node properties to converted from yapgvb to boost.
edge_properties - A list of strings naming edge properties to converted from yapgvb to boost.
Returns:
(bgraph, translation_map)

__init__(self, *args, **keywords)
(Constructor)

GraphBase is a base class used by Graph and Digraph. Do not instantiate it directly.

Class Method Details

read(cls, input_stream_or_filename)

Read a graph from a dot file. May be called from either the Digraph or Graph class; either way, the correct directed or undirected graph object will be returned.

from_bgl(cls, bgraph, node_properties=[], edge_properties=[])

Translate a boost.python graph into a yapgvb graph.

The returned translation_map behaves like a dictionary of all corresponding (boost_edge, yapgvb_edge), (yapgvb_edge, boost_edge), (boost_vertex, yapgvb_node), and (yapgvb_node, boost_vertex) key/value pairs.
Parameters:
bgraph - A boost.graph.Graph or boost.graph.Digraph instance
node_properties - A list of strings naming node properties to converted from boost to yapgvb.
edge_properties - A list of strings naming edge properties to converted from boost to yapgvb.
Returns:
(ygraph, translation_map)

Property Details

nodes

An iterator over all nodes in the graph

edges

An iterator of edges contained in the graph.

bb

Bounding box of drawing in integer points.

description of rect type

bgcolor

When attached to the root graph, this color is used as the background for entire canvas. When a cluster attribute, it is used as the initial background for the cluster. If a cluster has a filled style, the cluster's fillcolor will overlay the background color.

If no background color is specified for the root graph, no graphics operation are performed on the background. This works fine for PostScript but for bitmap output, all bits are initialized to something. This means that when the bitmap output is included in some other document, all of the bits within the bitmap's bounding box will be set, overwriting whatever color or graphics where already on the page. If this effect is not desired, and you only want to set bits explicitly assigned in drawing the graph, set background="transparent".

center

If true, the drawing is centered in the output canvas.

charset

Specifies the character encoding used when interpreting string input as a text label. The default value is "UTF-8". The other legal value is "iso-8859-1" or, equivalently, "Latin1". The charset attribute is case-insensitive. Note that if the character encoding used in the input does not match the charset value, the resulting output may be very strange.

clusterrank

Mode used for handling clusters. If clusterrank is "local", a subgraph whose name begins with "cluster" is given special treatment. The subgraph is laid out separately, and then integrated as a unit into its parent graph, with a bounding rectangle drawn about it. If the cluster has a label parameter, this label is displayed within the rectangle. Note also that there can be clusters within clusters. At present, the modes "global" and "none" appear to be identical, both turning off the special cluster processing.

Possible values: 'local', 'global', 'none'

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

compound

If true, allow edges between clusters. (See lhead and ltail below.)

concentrate

If true, use edge concentrators.

Damping

Factor damping force motions. On each iteration, a nodes movement is limited to this factor of its potential motion. By being less than 1.0, the system tends to ``cool'', thereby preventing cycling.

defaultdist

This specifies the distance between nodes in separate connected components. If set too small, connected components may overlap. Only applicable if pack=false.

dim

Set the number of dimensions used for the layout. The maximum value allowed is 10.

directed

True if directed, False if not. Read-only.

dpi

This specifies the expected number of pixels per inch on a display device. For bitmap output, this guarantees that text rendering will be done more accurately, both in size and in placement. For SVG output, it is used to guarantee that the dimensions in the output correspond to the correct number of points or inches.

epsilon

Terminating condition. If the length squared of all energy gradients are epsilon, the algorithm stops.

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.

fontpath

Directory list used by libgd to search for bitmap fonts if Graphviz was not built with the fontconfig library. If fontpath is not set, the environment variable DOTFONTPATH is checked. If that is not set, GDFONTPATH is checked. If not set, libgd uses its compiled-in font path. Note that fontpath is an attribute of the root graph.

fontsize

Font size, in points, used for text.

graph

graph to which this belongs (parent, if a subgraph, otherwise self)

K

Spring constant used in virtual physical model. It roughly corresponds to an ideal edge length (in inches), in that increasing K tends to increase the distance between nodes. Note that the edge attribute len can be used to override this value for adjacent nodes.

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.

labeljust

Justification for cluster labels. If "r", the label is right-justified within bounding rectangle; if "l", left-justified; else the label is centered. Note that a subgraph inherits attributes from its parent. Thus, if the root graph sets labeljust to "l", the subgraph inherits this value.

labelloc

Top/bottom placement of graph and cluster labels. If the attribute is "t", place label at the top; if the attribute is "b", place label at the bottom. By default, root graph labels go on the bottom and cluster labels go on the top. Note that a subgraph inherits attributes from its parent. Thus, if the root graph sets labelloc to "b", the subgraph inherits this value.

landscape

If true, the graph is rendered in landscape mode. Synonymous with rotate=90 or orientation=landscape.

layers

Specifies a linearly ordered list of layer names attached to the graph The graph is then output in separate layers. Only those components belonging to the current output layer appear. For more information, see the page How to use drawing layers (overlays).

layersep

Specifies the separator characters used to split the layers attribute into a list of layer names.

levelsgap

Specifies strictness of level constraints in neato when mode="hier". Larger positive values mean stricter constraints, which demand more separation between levels. On the other hand, negative values will relax the constraints by allowing some overlap between the levels.

lp

Label position, in points.

margin

For graphs, this sets x and y margins of canvas, in inches. If the margin is a single double, both margins are set equal to the given value.

For nodes, this attribute specifies space left around the node's label. By default, the value is 0.11,0.055.

maxiter

Sets the number of iterations used.

mclimit

Multiplicative scale factor used to alter the MinQuit (default = 8) and MaxIter (default = 24) parameters used during crossing minimization. These correspond to the number of tries without improvement before quitting and the maximum number of iterations in each pass.

mindist

Specifies the minimum separation between all nodes.

mode

Technique for optimizing the layout. If mode is "major", neato uses stress majorization. If mode is "KK", neato uses a version of the gradient descent method. The only advantage to the latter technique is that it is sometimes appreciably faster for small (number of nodes < 100) graphs. A significant disadvantage is that it may cycle.

There is a new, experimental mode in neato, "hier", which adds a top-down directionality similar to the layout used in dot.

model

This value specifies how the distance matrix is computed for the input graph. The distance matrix specifies the ideal distance between every pair of nodes. neato attemps to find a layout which best achieves these distances. By default, it uses the length of the shortest path, where the length of each edge is given by its len attribute. If model is "circuit", neato uses the circuit resistance model to compute the distances. This tends to emphasize clusters. If model is "subset", neato uses the subset model. This sets the edge length to be the number of nodes that are neighbors of exactly one of the end points, and then calculates the shortest paths. This helps to separate nodes with high degree.

nodesep

Minimum space between two adjacent nodes in the same rank, in inches.

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.

normalize

If set, normalize coordinates of final layout so that the first point is at the origin, and then rotate the layout so that the first edge is horizontal.

nslimit

nslimit1

ordering

If "out" for a graph G, and n is a node in G, then edges n->* appear left-to-right in the same order in which they are defined. If "in", the edges *->n appear left-to-right in the same order in which they are defined for all nodes n.

orientation

Angle, in degrees, used to rotate node shapes.

outputorder

Specify order in which nodes and edges are drawn.

Possible values: 'breadthfirst', 'nodesfirst', 'edgesfirst'

overlap

Determines if and how node overlaps should be removed. Nodes are first enlarged using the sep attribute. If "true" , overlaps are retained. If the value is "scale", overlaps are removed by uniformly scaling in x and y. If the value converts to "false", node overlaps are removed by a Voronoi-based technique. If the value is "scalexy", x and y are separately scaled to remove overlaps. If the value is "orthoxy" or "orthoyx", overlaps are moved by optimizing two constraint problems, one for the x axis and one for the y. The suffix indicates which axis is processed first. If the value is "ortho", the technique is similar to "orthoxy" except a heuristic is used to reduce the bias between the two passes. If the value is "ortho_yx", the technique is the same as "ortho", except the roles of x and y are reversed. The values "portho", "porthoxy", "porthoxy", and "portho_yx" are similar to the previous four, except only pseudo-orthogonal ordering is enforced.

If the value is "compress", the layout will be scaled down as much as possible without introducing any overlaps, obviously assuming there are none to begin with.

Except for fdp, the layouts assume overlap="true" as the default. Fdp first uses a number of passes using built-in, force-directed technique to remove overlaps. Thus, fdp accepts overlap with an integer prefix followed by a colon, specifying the number of tries. If there is no prefix, no initial tries will be performed. If there is nothing following a colon, none of the above methods will be attempted. By default, fdp uses overlap="9:portho". Note that overlap="true", overlap="0:true" and overlap="0:" all turn off all overlap removal.

Except for the Voronoi method, all of these transforms preserve the orthogonal ordering of the original layout. That is, if the x coordinates of two nodes are originally the same, they will remain the same, and if the x coordinate of one node is originally less than the x coordinate of another, this relation will still hold in the transformed layout. The similar properties hold for the y coordinates.

NOTEThe methods "orthoxy" and "orthoyx" are still evolving. The semantics of these may change, or these methods may disappear altogether.

pack

This is true if the value of pack is "true" (case-insensitive) or a non-negative integer. If true, each connected component of the graph is laid out separately, and then the graphs are packed tightly. If pack has an integral value, this is used as the size (in points) of a margin around each part; otherwise, a default margin of 8 is used. If pack is interpreted as false, the entire graph is laid out together. The granularity and method of packing is influenced by the packmode attribute.

For layouts which always do packing, such a twopi, the pack attribute is just used to set the margin.

packmode

This indicates the granularity and method used for packing (cf. packMode). Note that defining packmode will automatically turn on packing as though one had set pack=true.

Possible values: 'node', 'clust', 'graph'

page

Width and height of output pages, in inches. If this is set and is smaller than the size of the layout, a rectangular array of pages of the specified page size is overlaid on the layout, with origins aligned in the lower-left corner, thereby partitioning the layout into pages. The pages are then produced one at a time, in pagedir order.

pagedir

If the page attribute is set and applicable, this attribute specifies the order in which the pages are emitted. This is limited to one of the 8 row or column major orders.

Possible values: 'BL', 'BR', 'TL', 'TR', 'RB', 'RT', 'LB', 'LT'

quantum

If quantum > 0.0, node label dimensions will be rounded to integral multiples of the quantum.

rankdir

Sets direction of graph layout. For example, if rankdir="LR", and barring cycles, an edge T -> H; will go from left to right. By default, graphs are laid out from top to bottom.

Possible values: 'TB', 'LR', 'BT', 'RL'

ranksep

In dot, this the gives desired rank separation, in inches. This is the minimum vertical distance between the bottom of the nodes in one rank and the tops of nodes in the next. If the value contains "equally", the centers of all ranks are spaced equally apart. Note that both settings are possible, e.g., ranksep = "1.2 equally". In twopi, specifies radial separation of concentric circles.

ratio

Sets the aspect ratio (drawing height/drawing width) for the drawing. Note that this is adjusted before the size attribute constraints are enforced.

If ratio is numeric, it is taken as the desired aspect ratio. Then, if the actual aspect ratio is less than the desired ratio, the drawing height is scaled up to achieve the desired ratio; if the actual ratio is greater than that desired ratio, the drawing width is scaled up.

If ratio = "fill" and the size attribute is set, node positions are scaled, separately in both x and y, so that the final drawing exactly fills the specified size.

If ratio = "compress" and the size attribute is set, dot attempts to compress the initial layout to fit in the given size. This achieves a tighter packing of nodes but reduces the balance and symmetry. This feature only works in dot.

If ratio = "expand", the size attribute is set, and both the width and the height of the graph are less than the value in size, node positions are scaled uniformly until at least one dimension fits size exactly. Note that this is distinct from using size as the desired size, as here the drawing is expanded before edges are generated and all node and text sizes remain unchanged.

If ratio = "auto", the page attribute is set and the graph cannot be drawn on a single page, then size is set to an ``ideal'' value. In particular, the size in a given dimension will be the smallest integral multiple of the page size in that dimension which is at least half the current size. The two dimensions are then scaled independently to the new size. This feature only works in dot.

remincross

If true and there are multiple clusters, run cross minimization a second time.

resolution

This is a synonym for the dpi attribute.

root

This specifies nodes to be used as the center of the layout and the root of the generated spanning tree. As a graph attribute, this gives the name of the node. As a node attribute (circo only), it specifies that the node should be used as a central node. In twopi, this will actually be the central node. In circo, the block containing the node will be central in the drawing of its connected component. If not defined, twopi will pick a most central node, and circo will pick a random node.

rotate

If 90, set drawing orientation to landscape.

samplepoints

If the input graph defines the vertices attribute, and output is dot or xdot, this give the number of points used to represent circles and ellipses. It plays the same role in neato, when adjusting the layout to avoid overlapping nodes.

searchsize

During network simplex, maximum number of edges with negative cut values to search when looking for one with minimum cut value.

sep

Fraction to increase polygons (multiply coordinates by 1 + sep) for purposes of determining overlap. Guarantees a minimal non-zero distance between nodes. If unset but esep is defined, sep will be set to esep/0.8. If esep is unset, the default value is used.

showboxes

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

size

Maximum width and height of drawing, in inches. If defined and the drawing is too large, the drawing is uniformly scaled down so that it fits within the given size.

If size ends in an exclamation point (!), then it is taken to be the desired size. In this case, if both dimensions of the drawing are less than size, the drawing is scaled up uniformly until at least one dimension equals its dimension in size.

Note that there is some interaction between the size and ratio attributes.

splines

Controls how, and if, edges are represented. If true, edges are drawn as splines routed around nodes; if false, edges are drawn as line segments. (Note: at present (1 Jan 2006), setting splines=false has no effect in dot.) If set to "", no edges are drawn at all.

By default, the attribute is unset. How this is interpreted depends on the layout. For dot, the default is to draw edges as splines. For all other layouts, the default is to draw edges as line segments. Note that for these latter layouts, if splines="true", this requires non-overlapping nodes (cf. overlap). If fdp is used for layout and splines="compound", then the edges are drawn to avoid clusters as well as nodes.

start

Parameter used to determine the initial layout of nodes. By default, nodes are randomly placed in a unit square. The same seed is always used for the random number generator, so the initial placement is repeatable.

Possible values: 'regular', 'self', 'random'

strict

True if strict, False if not. Read-only.

stylesheet

A URL or pathname specifying an XML style sheet, used in SVG output.

target

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

truecolor

If set explicitly to true or false, the value determines whether or not internal bitmap rendering relies on a truecolor color model or uses a color palette. If the attribute is unset, truecolor is not used unless there is a shapefile property for some node in the graph. The output model will use the input model when possible.

Use of color palettes results in less memory usage during creation of the bitmaps and smaller output files.

Usually, the only time it is necessary to specify the truetype model is if the graph uses more than 256 colors. However, if one uses bgcolor=transparent with a color palette, font antialiasing can show up as a fuzzy white area around characters. Using truecolor=true avoids this problem.

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.

viewport

Clipping window on final drawing.

voro_margin


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