I want to set the size of my nodes relative to their impact in the graph, and I need to find some way to have their size appear in Gephi. At the moment, I'm using the following code:
def write_graph_dot(graph, filename, label=None):
g = AGraph(directed=True)
nodes = set()
for key in graph:
if key not in nodes:
nodes.add(key)
g.add_node(key, color='red')
node = g.get_node(key)
node.attr['fixedsize'] = True
node.attr['height'] = 1.0
node.attr['width'] = 1.0
for value in graph[key]:
if value not in nodes:
nodes.add(value)
g.add_node(key, color='black')
g.add_edge(key, value, color='black')
g.write(filename)
When I load this into Gephi, however, the nodes are all the same size. Am I missing something?