Commit 9e8fd596 authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix drawing of undirected graph

parent 7e99bed0
...@@ -121,7 +121,8 @@ def graph_draw(g, pos=None, size=(15,15), pin=False, layout="neato", ...@@ -121,7 +121,8 @@ def graph_draw(g, pos=None, size=(15,15), pin=False, layout="neato",
ge = gv.edge(nodes[g.vertex_index[e.source()]], ge = gv.edge(nodes[g.vertex_index[e.source()]],
nodes[g.vertex_index[e.target()]]) nodes[g.vertex_index[e.target()]])
gv.setv(ge, "arrowsize", "0.3") gv.setv(ge, "arrowsize", "0.3")
gv.setv(ge, "arrowhead", "vee") if g.is_directed():
gv.setv(ge, "arrowhead", "vee")
# apply color # apply color
if ecolor != None: if ecolor != None:
if isinstance(ecolor,str): if isinstance(ecolor,str):
......
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