Skip to content

Commit

Permalink
🚧 initial fix to #37 ( enrich graph )
Browse files Browse the repository at this point in the history
  • Loading branch information
Srinivas11789 committed May 9, 2019
1 parent c10a5e3 commit 1cf796f
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Source/Module/plot_lan_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ def __init__(self, filename, path, option="Tor"):
'fontsize': '16',
'fontcolor': 'black',
'bgcolor': 'grey',
'rankdir': 'BT',
'dpi':'1000'
'rankdir': 'LR', # BT
'dpi':'1000',
'size': '10, 10',
'overlap': 'scale'
},
'nodes': {
'fontname': 'Helvetica',
Expand Down Expand Up @@ -72,8 +74,12 @@ def apply_custom_style(self, graph, color):
return graph

def draw_graph(self,option="All"):
f = Digraph('network_diagram - '+option, filename=self.filename, engine="dot", format="png")
f.attr(rankdir='LR', size='8,5')
#f = Digraph('network_diagram - '+option, filename=self.filename, engine="dot", format="png")
#f.attr(rankdir='LR', size='8,5')
if len(memory.lan_hosts) > 20:
f = Digraph('network_diagram - '+option, filename=self.filename, engine="circo", format="png")
else:
f = Digraph('network_diagram - '+option, filename=self.filename, engine="dot", format="png")

f.attr('node', shape='doublecircle')
#f.node('defaultGateway')
Expand Down

0 comments on commit 1cf796f

Please sign in to comment.