ngraphic_data_structure — data structure representing the graphic properties used for nodes graphical display
A data structure represented by a Scilab mlist with type ngraphic
and 10 fields:
display a string. Gives the information that
is displayed with the nodes. The possible values are
'nothing', 'number',
'name' or any node data field name as given by
the nodedatafields function. Of course if
display is set to 'nothing' no
information is displayed.
defaults A Scilab tlist data structure of
type nodedefs. Contains the default values for
'type', 'diam','border',
'font', 'colors'
properties.
name A row vector of strings. The name associated with each node.
x A row vector which gives the abscissae of each node.
y A row vector which gives the ordinate of each node.
type A row vector with integer values
which stores the type index for each node. A zero value stands for the default value.
diam A row vector
which stores the diameter of each node. A zero value stands for the default value.
bordera row vector. The thickness of the
polyline used to draw the border of each node. A zero value stands for the default value.
colorsa matrix with to rows. The first row
contains the color index of the node border, the second row
contains the index of the node's background color. A zero
value of either color index stands for the corresponding default value.
fonta matrix with 3
rows: font(1,i) is the font size,
font(2,i) is the font
style,font(2,i) is the font color used to draw
information on the i th node.A zero
value of either entry stands for the corresponding default value.
//create a simple graph
ta=[1 1 2 7 8 9 10 10 10 10 11 12 13 13 4];
he=[2 10 7 8 9 7 7 11 13 13 12 13 9 10 4];
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')
g.nodes.graphics.defaults.border=2;
g.nodes.graphics.defaults.diam=22;
g.nodes.graphics.defaults.colors=[color('red');color('blue')];
show_graph(g)
g.nodes.graphics.border(1:5)=1;
g.nodes.graphics.diam(6)=40;
g.nodes.graphics.type(11)=1;
show_graph(g)
g.nodes.graphics.display='number';
show_graph(g)
g.nodes.graphics