nodedatafields — returns the vector of node data fields names
F = nodedatafields(g)
a graph data structure (see graph_data_structure )
a row vector of strings. Each element is a field name of the nodes data data structure.
It is possible to associate data to the nodes of a graph. This
can be done with the add_node_data function. the
nodedatafields
function allows to retreive the field
names of these data. A given node data can be referenced by its field name
g.nodes.data(field_name)
.
//create a simple graph ta=[1 1 2 7 8 9 10 10 10 10 11 12 13 13]; he=[2 10 7 8 9 7 7 11 13 13 12 13 9 10]; g=make_graph('simple',1,13,ta,he); g.nodes.graphics.x=[40,33,29,63,146,233,75,42,114,156,237,260,159]; g.nodes.graphics.y=[7,61,103,142,145,143,43,120,145,18,36,107,107]; show_graph(g,'new') nodedatafields(g) g=add_node_data(g,'demand',round(10*rand(1,13,'u'))); g=add_node_data(g,'label','e'+string(1:13)); nodedatafields(g) g.nodes.data.label