现在的位置: 首页 > 综合 > 正文

Node, Edge and Graph Attributes

2014年03月12日 ⁄ 综合 ⁄ 共 6731字 ⁄ 字号 评论关闭

The table below describes the attributes used by various Graphviz tools. The table gives the name of the attribute, the graph components (node, edge, etc.) which use the attribute
and the type of the attribute (strings representing legal values of that type). Where applicable, the table also gives a default value for the attribute, a minimum allowed setting for numeric attributes, and certain restrictions on the use of the attribute.

Note that attribute names are case-sensitive. This is usually true for attribute values as well, unless noted.

All Graphviz attributes are specified by name-value pairs. Thus, to set the fillcolor of a node abc, one would use

abc [fillcolor = red]

Similarly, to set the arrowhead style of an edge abc -> def,
one would use

abc -> def [arrowhead = diamond]

Further details concerning the setting of attributes can be found in the description of the DOT
language.

At present, most device-independent units are either inches or points, which we
take as 72 points per inch.

Note: Some attributes, such as dir or arrowtail,
are ambiguous when used in DOT with an undirected graph since the head and tail of an edge are meaningless. As a convention, the
first time an undirected edge appears, the DOT parser will assign the left node as the tail node and the right node as the head.
For example, the edge A -- B will have tail A and head B. It is the user's responsibility to handle such edges consistently. If the edge appears later, in the format

B -- A [taillabel = "tail"]

the drawing will attach the tail label to node A. To avoid
possible confusion when such attributes are required, the user is encouraged to use a directed graph. If it is important to make the graph appear undirected, this can be done using the 
dirarrowtail or arrowhead attributes.

The tools accept standard C representations for int and double types. For the bool type, TRUE values are represented by "true" or "yes" (case-insensitive) and any non-zero integer, and
FALSE values by "false" or "no" (case-insensitive) and zero. In addition, there are a variety of specialized types such as arrowTypecolorpoint and rankdir. Legal values for these types are given at the end.

In the Used By field, the characters E, N, G, S and C represent edges, nodes, the root graph, subgraphs and cluster subgraphs, respectively. This field indicates which graph component uses the attribute.


Name Used By Type Default Minimum Notes
Damping G double 0.99 0.0 neato only
K GC double 0.3 0 sfdp, fdp only
URL ENGC escString <none>   svg, postscript, map only
area NC double 1.0 >0 patchwork only
arrowhead E arrowType normal    
arrowsize E double 1.0 0.0  
arrowtail E arrowType normal    
aspect G aspectType     dot only
bb G rect     write only
bgcolor GC color 
colorList
<none>    
center G bool false    
charset G string "UTF-8"    
clusterrank G clusterMode local   dot only
color ENC color 
colorList
black    
colorscheme ENCG string ""    
comment ENG string ""    
compound G bool false   dot only
concentrate G bool false    
constraint E bool true   dot only
decorate E bool false    
defaultdist G double 1+(avg. len)*sqrt(|V|) epsilon neato only
dim G int 2 2 sfdp, fdp, neato only
dimen G int 2 2 sfdp, fdp, neato only
dir E dirType forward(directed)
none(undirected)
   
diredgeconstraints G string
bool
false   neato only
distortion N double 0.0 -100.0  
dpi G double 96.0
0.0
  svg, bitmap output only
edgeURL E escString ""   svg, map only
edgehref E escString ""   svg, map only
edgetarget E escString <none>   svg, map only
edgetooltip E escString ""   svg, cmap only
epsilon G double .0001 * # nodes(mode == KK)
.0001(mode == major)
  neato only
esep G addDouble 
addPoint
+3   not dot
fillcolor NEC color 
colorList
lightgrey(nodes)
black(clusters)
   
fixedsize N bool false    
fontcolor ENGC color black    
fontname ENGC string "Times-Roman"    
fontnames G string ""   svg only
fontpath G string system-dependent    
fontsize ENGC double 14.0 1.0  
forcelabels G bool true    
gradientangle NCG int ""    
group N string ""   dot only
headURL E escString ""   svg, map only
headclip E bool true    
headhref E escString ""   svg, map only
headlabel E lblString ""    
headport E portPos center    
headtarget E escString <none>   svg, map only
headtooltip E escString ""   svg, cmap only
height N double 0.5 0.02  
href GCNE escString ""   svg, postscript, map only
id GNE escString ""   svg, postscript, map only
image N string ""    
imagepath G string ""    
imagescale N bool 
string
false    
label ENGC lblString "'N" (nodes)
"" (otherwise)
   
labelURL E escString ""   svg, map only
label_scheme G int 0 0 sfdp only
labelangle E double -25.0 -180.0  
labeldistance E double 1.0 0.0  
labelfloat E bool false    
labelfontcolor E color black    
labelfontname E string "Times-Roman"    
labelfontsize E double 14.0 1.0  
labelhref E escString ""   svg, map only
labeljust GC string "c"    
labelloc NGC string "t"(clusters)
"b"(root graphs)
"c"(nodes)
   
labeltarget E escString <none>   svg, map only
labeltooltip E escString ""   svg, cmap only
landscape G bool false    
layer ENC layerRange ""    
layerlistsep G string ","    
layers G layerList ""    
layerselect G layerRange ""    
layersep G string " :'t"    
layout G string ""    
len E double 1.0(neato)
0.3(fdp)
  fdp, neato only
levels G int MAXINT 0.0 sfdp only
levelsgap G double 0.0   neato only
lhead E string ""   dot only
lheight GC double     write only
lp EGC point     write only
ltail E string ""   dot only
lwidth GC double     write only
margin NCG double
point
<device-dependent>    
maxiter G int 100 * # nodes(mode == KK)
200(mode == major)
600(fdp)
  fdp, neato only
mclimit G double 1.0   dot only
mindist G double 1.0 0.0 circo only
minlen E int 1 0 dot only
mode G string major   neato only
model G string shortpath   neato only
mosek G bool false   neato only
nodesep G double 0.25 0.02  
nojustify GCNE bool false    
normalize G bool false   not dot
nslimit 
nslimit1
G double     dot only
ordering GN string ""   dot only
orientation N double 0.0 360.0  
orientation G string ""    
outputorder G outputMode breadthfirst    
overlap G string
bool
true   not dot
overlap_scaling G double -4 -1.0e10 prism only
pack G bool 
int
false   not dot
packmode G packMode node   not dot
pad G double
point
0.0555 (4 points)    
page G double
point
     
pagedir G pagedir BL    
pencolor C color black    
penwidth CNE double 1.0 0.0  
peripheries NC int shape default(nodes)
1(clusters)
0  
pin N bool false   fdp, neato only
pos EN point 
splineType
     
quadtree G quadType 
bool
normal   sfdp only
quantum G double 0.0 0.0  
rank S rankType     dot only
rankdir G rankdir TB   dot only
ranksep G double
doubleList
0.5(dot)
1.0(twopi)
0.02 twopi, dot only
ratio G double
string
     
rects N rect     write only
regular N bool false    
remincross G bool false   dot only
repulsiveforce G double 1.0 0.0 sfdp only
resolution G double 96.0
0.0
  svg, bitmap output only
root GN string
bool
<none>(graphs)
false(nodes)
  circo, twopi only
rotate G int 0    
rotation G double 0   sfdp only
samehead E string ""   dot only
sametail E string ""   dot only
samplepoints N int 8(output)
20(overlap and image maps)
   
scale G double
point
    twopi only
searchsize G int 30   dot only
sep G addDouble 
addPoint
+4   not dot
shape N shape ellipse    
shapefile N string ""    
showboxes ENG int 0 0 dot only
sides N int 4 0  
size G double
point
     
skew N double 0.0 -100.0  
smoothing G smoothType "none"   sfdp only
sortv GCN int 0 0  
splines G bool 
string
     
start G startType ""   fdp, neato only
style ENCG style      
stylesheet G string ""   svg only
tailURL E escString ""   svg, map only
tailclip E bool true    
tailhref E escString ""   svg, map only
taillabel E lblString ""    
tailport E portPos center    
tailtarget E escString <none>   svg, map only
tailtooltip E escString ""   svg, cmap only
target ENGC escString 
string
<none>   svg, map only
tooltip NEC escString ""   svg, cmap only
truecolor G bool     bitmap output only
vertices N pointList     write only
viewport G viewPort ""    
voro_margin G double 0.05 0.0 not dot
weight E int
double
1 0(dot)
1(neato,fdp)
 
width N double 0.75 0.01  
xlabel EN lblString ""    

抱歉!评论已关闭.