Skip to content
Snippets Groups Projects
Commit 06c56b55 authored by nfontrod's avatar nfontrod
Browse files

src/find_interaction_cluster/graph_figures/create_community_node_graph.py:...

src/find_interaction_cluster/graph_figures/create_community_node_graph.py: change of node size and edges with
parent c22b1d42
No related branches found
No related tags found
No related merge requests found
......@@ -105,13 +105,13 @@ def create_graph(list_nodes: List[str], list_edges: List[Tuple],
:return: The community sized network
"""
g = nx.Graph()
nodes = [(n, {"node_size": s, "title": str(s), "size": log2(s)})
nodes = [(n, {"node_size": s, "title": str(s), "size": log2(s) * 2})
for n, s in zip(list_nodes, sizes)]
g.add_nodes_from(nodes)
g.add_weighted_edges_from(list_edges)
for a, b, c in list_edges:
g.edges[a, b]["title"] = str(g.edges[a, b]["weight"])
g.edges[a, b]["width"] = log10(g.edges[a, b]["weight"])
g.edges[a, b]["width"] = log10(g.edges[a, b]["weight"] * 2)
return g
......
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