1gv(3tcl)                                                              gv(3tcl)
2
3
4

NAME

6       gv_tcl - graph manipulation in tcl
7
8

SYNOPSIS

10       #!/usr/bin/tclsh
11       package require gv
12
13

USAGE

15       Requires tcl8.3 or later.
16
17

INTRODUCTION

19       gv_tcl  is  a dynamically loaded extension for tcl that provides access
20       to the graph facilities of graphviz.
21
22

COMMANDS

24       New graphs
25
26       New empty graph
27              <graph_handle> gv::graph <name>
28              <graph_handle> gv::digraph <name>
29              <graph_handle> gv::strictgraph <name>
30              <graph_handle> gv::strictdigraph <name>
31
32       New graph from a dot-syntax string or file
33              <graph_handle> gv::readstring <string>
34              <graph_handle> gv::read <string> filename
35              <graph_handle> gv::read <channel>
36
37       Add new subgraph to existing graph
38              <graph_handle> gv::graph <graph_handle> <name>
39
40       New nodes
41
42       Add new node to existing graph
43              <node_handle> gv::node <graph_handle> <name>
44
45       New edges
46
47       Add new edge between existing nodes
48              <edge_handle> gv::edge <tail_node_handle> <head_node_handle>
49
50       Add a new edge between an existing tail node, and  a  named  head  node
51       which will be induced in the graph if it doesn't already exist
52              <edge_handle> gv::edge <tail_node_handle> <head_name>
53
54       Add  a  new  edge  between an existing head node, and a named tail node
55       which will be induced in the graph if it doesn't already exist
56              <edge_handle> gv::edge <tail_name> <head_node_handle>
57
58       Add a new edge between named tail  and head nodes which will be induced
59       in the graph if they don't already exist
60              <edge_handle> gv::edge <graph_handle> <tail_name> <head_name>
61
62       Setting attribute values
63
64       Set value of named attribute of graph/node/edge - creating attribute if
65       necessary
66              <string> gv::setv <graph_handle> <attr_name> <attr_value>
67              <string> gv::setv <node_handle> <attr_name> <attr_value>
68              <string> gv::setv <edge_handle> <attr_name> <attr_value>
69
70       Set value of existing attribute  of  graph/node/edge  (using  attribute
71       handle)
72              <string> gv::setv <graph_handle> <attr_handle> <attr_value>
73              <string> gv::setv <node_handle> <attr_handle> <attr_value>
74              <string> gv::setv <edge_handle> <attr_handle> <attr_value>
75
76       Getting attribute values
77
78       Get value of named attribute of graph/node/edge
79              <string> gv::getv <graph_handle> <attr_name>
80              <string> gv::getv <node_handle> <attr_name>
81              <string> gv::getv <edge_handle> <attr_name>
82
83       Get value of attribute of graph/node/edge (using attribute handle)
84              <string> gv::getv <graph_handle> <attr_handle>
85              <string> gv::getv <node_handle> <attr_handle>
86              <string> gv::getv <edge_handle> <attr_handle>
87
88       Obtain names from handles
89              <string> gv::nameof <graph_handle>
90              <string> gv::nameof <node_handle>
91              <string> gv::nameof <attr_handle>
92
93       Find handles from names
94              <graph_handle> gv::findsubg <graph_handle> <name>
95              <node_handle> gv::findnode <graph_handle> <name>
96              <edge_handle> gv::findedge <tail_node_handle> <head_node_handle>
97              <attr_handle> gv::findattr <graph_handle> <name>
98              <attr_handle> gv::findattr <node_handle> <name>
99              <attr_handle> gv::findattr <edge_handle> <name>
100
101       Misc graph navigators returning handles
102              <node_handle> gv::headof <edge_handle>
103              <node_handle> gv::tailof <edge_handle>
104              <graph_handle> gv::graphof <graph_handle>
105              <graph_handle> gv::graphof <edge_handle>
106              <graph_handle> gv::graphof <node_handle>
107              <graph_handle> gv::rootof <graph_handle>
108
109       Obtain handles of proto node/edge for setting default attribute values
110              <node_handle> gv::protonode <graph_handle>
111              <edge_handle> gv::protoedge <graph_handle>
112
113       Iterators
114
115       Iteration termination tests
116              <boolean_string> gv::ok <graph_handle>
117              <boolean_string> gv::ok <node_handle>
118              <boolean_string> gv::ok <edge_handle>
119              <boolean_string> gv::ok <attr_handle>
120
121       Iterate over subgraphs of a graph
122              <graph_handle> gv::firstsubg <graph_handle>
123              <graph_handle> gv::nextsubg <graph_handle> <subgraph_handle>
124
125       Iterate over supergraphs of a graph (obscure and rarely useful)
126              <graph_handle> gv::firstsupg <graph_handle>
127              <graph_handle> gv::nextsupg <graph_handle> <subgraph_handle>
128
129       Iterate over edges of a graph
130              <edge_handle> gv::firstedge <graph_handle>
131              <edge_handle> gv::nextedge <graph_handle> <edge_handle>
132
133       Iterate over outedges of a graph
134              <edge_handle> gv::firstout <graph_handle>
135              <edge_handle> gv::nextout <graph_handle> <edge_handle>
136
137       Iterate over edges of a node
138              <edge_handle> gv::firstedge <node_handle>
139              <edge_handle> gv::nextedge <node_handle> <edge_handle>
140
141       Iterate over out-edges of a node
142              <edge_handle> gv::firstout <node_handle>
143              <edge_handle> gv::nextout <node_handle> <edge_handle>
144
145       Iterate over head nodes reachable from out-edges of a node
146              <node_handle> gv::firsthead <node_handle>
147              <node_handle> gv::nexthead <node_handle> <head_node_handle>
148
149       Iterate over in-edges of a graph
150              <edge_handle> gv::firstin <graph_handle>
151              <edge_handle> gv::nextin <node_handle> <edge_handle>
152
153       Iterate over in-edges of a node
154              <edge_handle> gv::firstin <node_handle>
155              <edge_handle> gv::nextin <graph_handle> <edge_handle>
156
157       Iterate over tail nodes reachable from in-edges of a node
158              <node_handle> gv::firsttail <node_handle>
159              <node_handle> gv::nexttail <node_handle> <tail_node_handle>
160
161       Iterate over nodes of a graph
162              <node_handle> gv::firstnode <graph_handle>
163              <node_handle> gv::nextnode <graph_handle> <node_handle>
164
165       Iterate over nodes of an edge
166              <node_handle> gv::firstnode <edge_handle>
167              <node_handle> gv::nextnode <edge_handle> <node_handle>
168
169       Iterate over attributes of a graph
170              <attr_handle> gv::firstattr <graph_handle>
171              <attr_handle> gv::nextattr <graph_handle> <attr_handle>
172
173       Iterate over attributes of an edge
174              <attr_handle> gv::firstattr <edge_handle>
175              <attr_handle> gv::nextattr <edge_handle> <attr_handle>
176
177       Iterate over attributes of a node
178              <attr_handle> gv::firstattr <node_handle>
179              <attr_handle> gv::nextattr <node_handle> <attr_handle>
180
181       Remove graph objects
182              <boolean_string> gv::rm <graph_handle>
183              <boolean_string> gv::rm <node_handle>
184              <boolean_string> gv::rm <edge_handle>
185
186       Layout
187
188       Annotate  a  graph  with  layout attributes and values using a specific
189       layout engine
190              <boolean_string> gv::layout <graph_handle> <string> engine
191
192       Render
193
194       Render a layout into attributes of the graph
195              <boolean_string> gv::render <graph_handle>
196
197       Render a layout to stdout
198              <boolean_string> gv::render <graph_handle> <string> format
199
200       Render to an open file
201              <boolean_string>  gv::render  <graph_handle>   <string>   format
202              <channel> fout
203
204       Render a layout to an unopened file by name
205              <boolean_string>   gv::render   <graph_handle>  <string>  format
206              <string> filename
207
208       Render to a string result
209              <string> gv::renderresult <graph_handle> ing <string> format
210              gv::renderresult <graph_handle> <string> format <string> outdata
211
212       Render to an open channel
213              <boolean_string> gv::renderchannel <graph_handle> <string>  for‐
214              mat <string> channelname
215
216       Render a layout to a malloc'ed string, to be free'd by the caller
217
218       (deprecated - too easy to leak memory)
219
220       (still needed for "eval [gv::renderdata $G tk]" )
221              <string> gv::renderdata <graph_handle> <string> format
222
223       Writing graph back to file
224              <boolean_string> gv::write <graph_handle> <string> filename
225              <boolean_string> gv::write <graph_handle> <channel>
226
227       Graph transformation tools
228              <boolean_string> gv::tred <graph_handle>
229
230

KEYWORDS

232       graph, dot, neato, fdp, circo, twopi, tcl.
233
234
235
236
237                                 07 July 2023                         gv(3tcl)
Impressum