- Timestamp:
- Sep 25, 2013 9:53:37 AM (11 years ago)
- Branches:
- master
- Children:
- 19d2b72
- Parents:
- 467cd2e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_image.py
r467cd2e rbefb8e4 115 115 # For each node in the subgraph, output its representation 116 116 for i, n in enumerate(nodes): 117 line = "" 117 118 if isinstance(n, topdl.Computer): 118 119 if n.name: 119 print >>dotfile, \ 120 '\t"%s" [shape=box,style=filled,\\' % n.name 120 line = '\t"%s" [shape=box,style=filled,' % n.name 121 121 else: 122 print >>dotfile, \ 123 '\t"unnamed_node%d" [shape=box,style=filled,\\'\ 124 % i 125 print >>dotfile, \ 126 '\t\tcolor=black,fillcolor="#60f8c0",regular=1]' 122 line = '\t"unnamed_node%d" [shape=box,style=filled,' % i 123 line += 'color=black,fillcolor="#60f8c0",regular=1]' 127 124 elif isinstance(n, topdl.Substrate): 128 print >>dotfile, '\t"%s" [shape=ellipse, style=filled,\\' \129 % n.name130 print >>dotfile,\131 '\t\tcolor=black,fillcolor="#80c0f8",regular=1]' 125 line = '\t"%s" [shape=ellipse, style=filled,' % n.name 126 line += 'color=black,fillcolor="#80c0f8",regular=1]' 127 print >>dotfile, line 128 132 129 print >>dotfile, '}' 133 130
Note: See TracChangeset
for help on using the changeset viewer.