shukdevdatta123 commited on
Commit
d818adf
·
verified ·
1 Parent(s): 697ab3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -45,7 +45,7 @@ def default_example_decomposition():
45
 
46
  ax1 = fig.add_subplot(axgrid[0, 0])
47
  ax1.set_title("Bayesian Network")
48
- pos = nx.nx_agraph.graphviz_layout(B, prog="neato")
49
  nx.draw_networkx(B, pos=pos, **options)
50
 
51
  mg = nx.moral_graph(B)
@@ -58,7 +58,7 @@ def default_example_decomposition():
58
  ax3.set_title("Junction Tree")
59
  ax3.margins(0.15, 0.25)
60
  nsize = [2000 * len(n) for n in list(jt.nodes())]
61
- pos = nx.nx_agraph.graphviz_layout(jt, prog="neato")
62
  nx.draw_networkx(jt, pos=pos, node_size=nsize, **options)
63
 
64
  plt.tight_layout()
@@ -88,7 +88,7 @@ def create_own_graph_decomposition():
88
 
89
  ax1 = fig.add_subplot(axgrid[0, 0])
90
  ax1.set_title("Bayesian Network")
91
- pos = nx.nx_agraph.graphviz_layout(G, prog="neato")
92
  nx.draw_networkx(G, pos=pos, **options)
93
 
94
  mg = nx.moral_graph(G)
@@ -101,7 +101,7 @@ def create_own_graph_decomposition():
101
  ax3.set_title("Junction Tree")
102
  ax3.margins(0.15, 0.25)
103
  nsize = [2000 * len(n) for n in list(jt.nodes())]
104
- pos = nx.nx_agraph.graphviz_layout(jt, prog="neato")
105
  nx.draw_networkx(jt, pos=pos, node_size=nsize, **options)
106
 
107
  plt.tight_layout()
 
45
 
46
  ax1 = fig.add_subplot(axgrid[0, 0])
47
  ax1.set_title("Bayesian Network")
48
+ pos = nx.nx_pydot.pydot_layout(B, prog="neato")
49
  nx.draw_networkx(B, pos=pos, **options)
50
 
51
  mg = nx.moral_graph(B)
 
58
  ax3.set_title("Junction Tree")
59
  ax3.margins(0.15, 0.25)
60
  nsize = [2000 * len(n) for n in list(jt.nodes())]
61
+ pos = nx.nx_pydot.pydot_layout(jt, prog="neato")
62
  nx.draw_networkx(jt, pos=pos, node_size=nsize, **options)
63
 
64
  plt.tight_layout()
 
88
 
89
  ax1 = fig.add_subplot(axgrid[0, 0])
90
  ax1.set_title("Bayesian Network")
91
+ pos = nx.nx_pydot.pydot_layout(G, prog="neato")
92
  nx.draw_networkx(G, pos=pos, **options)
93
 
94
  mg = nx.moral_graph(G)
 
101
  ax3.set_title("Junction Tree")
102
  ax3.margins(0.15, 0.25)
103
  nsize = [2000 * len(n) for n in list(jt.nodes())]
104
+ pos = nx.nx_pydot.pydot_layout(jt, prog="neato")
105
  nx.draw_networkx(jt, pos=pos, node_size=nsize, **options)
106
 
107
  plt.tight_layout()