5
0
mirror of https://github.com/cwinfo/yggdrasil-map synced 2024-11-28 18:41:36 +00:00

less variation in node size

This commit is contained in:
Arceliar 2018-11-17 16:34:09 -06:00
parent 28ce5317c6
commit be7a5e0c52

View File

@ -59,8 +59,7 @@ def get_graph_json(G):
neighbor_ratio = len(G.neighbors(n)) / float(max_neighbors)
pos = n.attr['pos'].split(',', 1)
centrality = centralities.get(n.name, 0)
pcentrality = (centrality + 0.0001) * 500
size = (pcentrality ** 0.3 / 500) * 1000 + 1
size = 5*(1 + 1*centrality)
name = None#db.get(n.name)
out_data['nodes'].append({