diff options
author | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> | 2008-11-13 10:30:50 +0100 |
---|---|---|
committer | Adrien Di Mascio <Adrien.DiMascio@logilab.fr> | 2008-11-13 10:30:50 +0100 |
commit | f3fa43de6a1f1e169abaec895c054c4602d90afb (patch) | |
tree | a99a2b10c82053e3f0b93d376429243eb83dab29 /graph.py | |
parent | 5ab11c41e4a2be1fd4041fd952cbd25c4d74fbc2 (diff) | |
download | logilab-common-f3fa43de6a1f1e169abaec895c054c4602d90afb.tar.gz |
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;
Diffstat (limited to 'graph.py')
-rw-r--r-- | graph.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |