Skip to content

Commit d458ca8

Browse files
committed
fixed a work around for small bug in the draw_grapviz function in networkx-1.11 which no longer import toplevel namespace
1 parent 599d976 commit d458ca8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

traub_2005/py/gui.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,9 @@ def displayGraph(self, g, label=False):
195195
print('Empty graph for cell. Make sure proto file has `*asymmetric` on top. I cannot handle symmetric compartmental connections')
196196
return
197197
weights = np.array([g.edge[e[0]][e[1]]['weight'] for e in g.edges()])
198-
pos = nx.graphviz_layout(g, prog='twopi')
198+
#pos = nx.graphviz_layout(g, prog='twopi')
199+
from networkx.drawing.nx_agraph import graphviz_layout
200+
pos = graphviz_layout(g, prog='twopi')
199201
xmin, ymin, xmax, ymax = 1e9, 1e9, -1e9, -1e9
200202
for p in pos.values():
201203
if xmin > p[0]:

0 commit comments

Comments
 (0)