<< graph_sum Graphs - Nets is_connex >>

metanet >> metanet > Graphs - Nets > graph_union

graph_union

union of two graphs

Calling Sequence

g2 = graph_union(g,g1 [,opt])

Parameters

g

a graph_data_structure.

g1

a graph data structure.

opt

a boolean, with %t as default value.

g2

graph data structure of the new graph

Description

Examples

ta1=[1,2,3,4,4,4,4,5,6,7,7];he1=[2,3,1,1,5,7,7,6,7,3,4];
g1=make_graph('foo1',1,7,ta1,he1);
g1.nodes.graphics.x= [273,271,339,384,504,513,439];
g1.nodes.graphics.y= [221,324,432,141,209,319,428];
g1.nodes.graphics.display= 'name';
g1.nodes.graphics.name= ['A' 'B' 'C' 'D' 'E' 'F' 'G'];
w1=show_graph(g1);

ta2=[1,1,2,2,3,5,6,6,7,8];he2=[2,8,3,5,4,6,4,7,5,5];
g2=make_graph('foo2',1,8,ta2,he2);
g2.nodes.graphics.x= [233,113,114,114,223,221,289,334];
g2.nodes.graphics.y= [59, 133,227,319,221,324,432,141];
g2.nodes.graphics.name= ['H' 'I' 'J' 'K' 'A' 'B' 'C' 'D'];
g2.nodes.graphics.display= 'name';
w2=show_graph(g2,'new');

g=graph_union(g1,g2);
show_graph(g,'new');

g=graph_union(g1,g2,%f);
show_graph(g,'new');

See Also


Report an issue
<< graph_sum Graphs - Nets is_connex >>