feat: decouple popularity and weighting in node_color

This commit is contained in:
julius 2025-02-12 16:08:43 +01:00
parent 3ec065aaf9
commit dee40ebdb6
Signed by: julius
GPG Key ID: C80A63E6A5FD7092

View File

@ -96,7 +96,9 @@ async def render_sociogram(params: Params):
nodes = nx.draw_networkx_nodes(
G,
pos,
node_color=[v for k, v in G.in_degree(weight="popularity")]
node_color=[
v for k, v in G.in_degree(weight="popularity" if params.weighting else None)
]
if params.popularity
else "#99ccff",
edgecolors="#404040",