> restart;

> with(networks):

> new(theory):

> addvertex([I1,I2,T1],theory);
addedge([I2,T1],theory);

[Maple Math]

[Maple Math]

>

mylin

> mylin := proc(partitions, G, origin, clr, thk)
local e, max_x, middle, n,tex,lin, nx, part, shift, t1, text, pos, x, y, t, vset, lines, points, i, j, v, center;
center := origin[1 .. 2];
vset := {};
n := 0;
part := table();
shift := table();
for t in partitions do
n := n + 1;
shift[n] := 0;
t1 := select(hastype, t, 'identical'('offset') = numeric);
if t1 <> [] then
shift[n] := subs({op(t1)}, 'offset');
t := select(proc(x) not hastype(x, `=`) end, t)
else if {op(t)} intersect vset <> {} then ERROR(`intersecting partitions involving`, t) fi
fi;
part[n] := t;
vset := vset union {op(t)}
od;
if networks['vertices'](G) minus vset <> {} then
n := n + 1;
t := sort([op(networks['vertices'](G) minus vset)]);
part[n] := t; shift[n] := 0
fi;
max_x := origin[1];
for j to n do if max_x < nops(part[j]) then max_x := nops(part[j]) fi od;
middle := 1/2*max_x - 1/2 + origin[1];
text := table();
pos := table();
x := origin[1];
for j to n do
vset := part[j];
nx := nops(vset);
x := x + 1;
y := middle - 1/2*nx + 1/2 + shift[j] + origin[2];
for i to nops(vset) do
v := vset[i];
pos[v] := [x, y];
if j = n then text[v] := [pos[v][1] + .08, pos[v][2], convert(v, string)] ;
else text[v] := [pos[v][1] - .1, pos[v][2], convert(v, string)]
fi;
y := y + 1
od
od;
lines := table();
for e in edges(G) do
x := networks['ends'](e, G);
if 1 < nops(x) then y := x[2]; x := x[1] else x := x[1] fi;
lines[e] := [pos[x], pos[y]]
od;
t :=plot( {entries(pos)}, symbol=circle,style=point,color=black,thickness=thk);
lin :=plot( map(op, { entries(lines)}),color=clr);
tex := map(op,{entries(text)});
tex := plots[textplot](tex,color=black);
plots[display]([tex,t,lin ], thickness = thk,axes=none)
end:

> mylin([[I1,I2],[T1]],theory,[0,0],blue,3);

[Maple Plot]