Nodes are created by calling Graph.add_node.
Edges can be created through the use of overloaded operators -,
<<, and >>.
Property Summary |
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. |
float |
distortion : Distortion factor for shape=polygon. |
str |
fillcolor : Color used to fill the background of a node or cluster. |
boolean |
fixedsize : If true, the node size is specified by the values of the width and
height attributes only and is not expanded to contain the text label. |
str |
fontcolor : Color used for text. |
str |
fontname : Font used for text. |
float |
fontsize : Font size, in points, used for text. |
str |
group : If the end points of an edge belong to the same group, i.e., have the
same group attribute, parameters are set to avoid crossings and keep the
edges straight. |
float |
height : Height of node, in inches. |
str |
label : Text label attached to objects. |
str |
layer : Specifies layers in which the node or edge is present. |
float |
margin : For graphs, this sets x and y margins of canvas, in inches. |
boolean |
nojustify : By default, the justification of multi-line labels is done within the
largest context that makes sense. |
float |
orientation : Angle, in degrees, used to rotate node shapes. |
int |
peripheries : Set number of peripheries used in polygonal shapes and cluster
boundaries. |
boolean |
pin : If true and the node has a pos attribute on input, neato prevents the
node from moving from the input position. |
(x,y) or (x,y,z) tuple |
pos : Position of node, or spline control points, in points. |
rect |
rects : Rectangles for fields of records, in points. |
boolean |
regular : If true, force polygon to be regular. |
boolean |
root : This specifies nodes to be used as the center of the layout and the
root of the generated spanning tree. |
string |
shape : Set the shape of a node. |
str |
shapefile : If defined, shapefile specifies a file containing user-supplied node
content. |
int |
showboxes : Print guide boxes in PostScript at the beginning of routesplines if 1,
or at the end if 2. |
int |
sides : Number of sides if shape=polygon. |
float |
skew : Skew factor for shape=polygon. |
str |
style : Set style for node or 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. |
str |
vertices : If the input graph defines this attribute, the node is polynomial, and
output is dot or xdot, this attribute provides the coordinates of the
vertices of the node's polynomial, in inches. |
float |
width : Width of node, in inches. |
float |
z : Provides z coordinate value for 3D layouts and displays. |
Graph Definition |
|
__sub__ : The syntax tail_node - head_node creates an undirected edge between
two nodes. |
|
__lshift__ : The syntax head_node << tail_node creates a directed edge
between two nodes. |
|
__rshift__ : The syntax tail_node >> head_node creates a directed edge
between two nodes. |
Graph Traversal |
|
edges |
|
inbound_edges |
|
outbound_edges |
|
graph : The graph to which a Node belongs. |
shape
Set the shape of a node.
Possible values: 'box', 'polygon', 'ellipse', 'circle', 'point',
'egg', 'triangle', 'plaintext', 'diamond', 'trapezium', 'parallelogram',
'house', 'pentagon', 'hexagon', 'septagon', 'octagon', 'doublecircle',
'doubleoctagon', 'tripleoctagon', 'invtriangle', 'invtrapezium',
'invhouse', 'Mdiamond', 'Msquare', 'Mcircle', 'rect', 'rectangle',
'none', 'record', 'Mrecord'
|