Skip to content

Commit 658d0f9

Browse files
added arrows to the graph because directionality is super important in codebase dependency edges!
1 parent 51ae1cb commit 658d0f9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

codegraph/vizualyzer.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,17 @@ def draw_graph(modules_entities: Dict) -> None:
7575
font_family="Arial",
7676
font_size=10,
7777
)
78+
79+
arrow_size = 15
80+
7881
nx.draw_networkx_edges(
7982
G,
8083
pos,
8184
edgelist=module_edges_all,
8285
edge_color="#009c2c",
8386
width=2,
84-
arrows=False,
87+
arrows=True,
88+
arrowsize=arrow_size,
8589
style="dashed",
8690
node_size=50,
8791
)
@@ -91,9 +95,10 @@ def draw_graph(modules_entities: Dict) -> None:
9195
edgelist=sub_edges_all,
9296
edge_color="r",
9397
width=2,
94-
arrows=False,
98+
arrows=True,
99+
arrowsize=arrow_size,
95100
style="dashed",
96101
)
97-
for p in pos: # raise text positions
102+
for p in pos:
98103
pos[p][1] += 0.07
99104
plt.show()

0 commit comments

Comments
 (0)