Skip to content
Snippets Groups Projects
Commit 3728ecb2 authored by nfontrod's avatar nfontrod
Browse files

src/find_interaction_cluster/community_finder.py: update create figure function

parent 1e2fee21
No related branches found
No related tags found
No related merge requests found
......@@ -213,20 +213,23 @@ def create_figure(graph: nx.Graph, outfile: Path, dic_community: Dict,
node_y = []
node_text = []
node_color = []
line_color = []
for node in graph.nodes():
x, y = nodes[node]
node_text.append(f"{node} - {dic_community[node]['num']}")
node_x.append(x)
node_y.append(y)
node_color.append(dic_community[node]['col'])
line_color.append(dic_community[node]['line'])
node_trace = go.Scatter(
x=node_x, y=node_y,
mode='markers',
hoverinfo='text',
marker=dict(
color=node_color,
line=dict(width=3, color=line_color),
size=20,
line_width=2))
))
node_trace.text = node_text
fig = go.Figure(data=[edge_trace, middle_node_trace, node_trace],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment