From f3fa43de6a1f1e169abaec895c054c4602d90afb Mon Sep 17 00:00:00 2001 From: Adrien Di Mascio Date: Thu, 13 Nov 2008 10:30:50 +0100 Subject: fix dot files' edge generation Before this patch, edges were defined using the following scheme : Node1 -> Node2 edge [attrs...] Node2 -> Node3 which `dot` understands as three instructions : Node1 -> Node2 ; edge [attr...]; Node2 -> Node3; which means that edge properties are applied to the Node2->Node3 edge rather than to the Node1->Node2 edge. The correct syntax is : Node1 -> Node2 [attr...]; Node2 -> Node3; --- graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graph.py') diff --git a/graph.py b/graph.py index a672166..c6469ef 100644 --- a/graph.py +++ b/graph.py @@ -105,7 +105,7 @@ class DotBackend: """ attrs = ['%s="%s"' % (prop, value) for prop, value in props.items()] n_from, n_to = normalize_node_id(name1), normalize_node_id(name2) - self.emit('%s -> %s edge [%s];' % (n_from, n_to, ", ".join(attrs)) ) + self.emit('%s -> %s [%s];' % (n_from, n_to, ", ".join(attrs)) ) def emit_node(self, name, **props): """Authorized props: see http://www.graphviz.org/doc/info/attrs.html -- cgit v1.2.1