projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4def6ec
)
examples/dataflow: adapt to new simple MultiDiGraph implementation
author
Robert Jordens
<jordens@gmail.com>
Sun, 7 Sep 2014 06:09:53 +0000
(
00:09
-0600)
committer
Sebastien Bourdeauducq
<sb@m-labs.hk>
Sun, 7 Sep 2014 08:48:46 +0000
(16:48 +0800)
examples/dataflow/structuring.py
patch
|
blob
|
history
diff --git
a/examples/dataflow/structuring.py
b/examples/dataflow/structuring.py
index ea2cea99f078261602207163a6e7e967e3769276..2342c343c17edc5e12f10f7903922996207f95e7 100644
(file)
--- a/
examples/dataflow/structuring.py
+++ b/
examples/dataflow/structuring.py
@@
-59,7
+59,10
@@
if __name__ == "__main__":
tb = TB()
run_simulation(tb, ncycles=1000)
- g_layout = nx.spectral_layout(tb.g)
- nx.draw(tb.g, g_layout)
- nx.draw_networkx_edge_labels(tb.g, g_layout, tb.reporter.get_edge_labels())
+ g = nx.MultiDiGraph()
+ for u, v, edge in tb.g.edges_iter():
+ g.add_edge(u, v, **edge)
+ g_layout = nx.spectral_layout(g)
+ nx.draw(g, g_layout)
+ nx.draw_networkx_edge_labels(g, g_layout, tb.reporter.get_edge_labels())
plt.show()