Commit 0eb1456a authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain

use influence sign in Graphviz

parent d13a6fec
......@@ -94,6 +94,8 @@ create_cgraph(Id, Graph) :-
agattr(Graph, graph, size, '7.5,11', _),
agattr(Graph, graph, ratio, fill, _),
agattr(Graph, node, shape, ellipse, _),
agattr(Graph, edge, arrowhead, 'normal', _),
agattr(Graph, edge, color, 'black', _),
\+ (
item([parent: Id, kind: vertex, item: VertexName, id: VertexId]),
\+ (
......@@ -108,13 +110,25 @@ create_cgraph(Id, Graph) :-
)
),
\+ (
item([parent: Id, kind: edge, item: Edge]),
item([parent: Id, kind: edge, item: Edge, id: EdgeId]),
\+ (
format(atom(EdgeName), '~w', [Edge]),
Edge = (VertexA -> VertexB),
agnode(Graph, VertexA, false, NodeA),
agnode(Graph, VertexB, false, NodeB),
agedge(Graph, NodeA, NodeB, EdgeName, true, _Edge)
agedge(Graph, NodeA, NodeB, EdgeName, true, GraphvizEdge),
(
get_attribute(EdgeId, sign='-')
->
agset(GraphvizEdge, arrowhead, 'tee'),
agset(GraphvizEdge, color, 'red')
;
get_attribute(EdgeId, sign='+')
->
agset(GraphvizEdge, color, 'green4')
;
true
)
)
).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment