Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def draw_graph(G, pos=None, title="Graph Visualization"):
|
|
32 |
# Default example code
|
33 |
def default_example_circular_tree():
|
34 |
G = nx.balanced_tree(3, 5)
|
35 |
-
pos = nx.nx_agraph.
|
36 |
plt.figure(figsize=(8, 8))
|
37 |
nx.draw(G, pos, node_size=20, alpha=0.5, node_color="blue", with_labels=False)
|
38 |
plt.axis("equal")
|
@@ -50,7 +50,7 @@ def create_own_graph_circular_tree():
|
|
50 |
if generate_button:
|
51 |
# Generate graph and layout
|
52 |
G = nx.balanced_tree(branching_factor, depth)
|
53 |
-
pos = nx.nx_agraph.
|
54 |
|
55 |
# Draw the graph
|
56 |
plt.figure(figsize=(8, 8))
|
|
|
32 |
# Default example code
|
33 |
def default_example_circular_tree():
|
34 |
G = nx.balanced_tree(3, 5)
|
35 |
+
pos = nx.nx_agraph.pygraphviz_layout(G, prog="twopi", args="")
|
36 |
plt.figure(figsize=(8, 8))
|
37 |
nx.draw(G, pos, node_size=20, alpha=0.5, node_color="blue", with_labels=False)
|
38 |
plt.axis("equal")
|
|
|
50 |
if generate_button:
|
51 |
# Generate graph and layout
|
52 |
G = nx.balanced_tree(branching_factor, depth)
|
53 |
+
pos = nx.nx_agraph.pygraphviz_layout(G, prog="twopi", args="")
|
54 |
|
55 |
# Draw the graph
|
56 |
plt.figure(figsize=(8, 8))
|