Reputation: 4797
I'm trying to create a graph in Gephi
. This graph is undirected and has over 100 nodes. I would like to color the nodes in this graph according to my convenience. Say I'd like to color the nodes in 9 different colors. For doing this, I downloaded a plugin to Gephi
which may be found here.
Though the plugin works, I still have to go and enter the color value for every single node manually. There doesn't seem to be a way to do this programatically. And I'd have to create about 10 such graphs, so that means a lot of manual labor.
Can someone help me out with this problem? Does someone know a better way to have custom colors for each node generated programatically? At this point, I'm generating a .gdf
file, the format looks something like this.
I also know that Gephi
is quite buggy, is there any other graph visualization
software that I can use? Out of the other usual things that one does to the graph, I definitely want the capability to set edge weights
. In other words, I'd like to make the edges thicker if the edge weight is more and vice-versa.
I can't use D3
coz I don't know Javascript
. I looked into using GraphViz
but it seems like it requires a lot of manual manipulation of the graph file. I'd like to have something that I'm able to generate programatically.
Upvotes: 2
Views: 4343
Reputation: 2775
What seems to be working is to add a column named color VARCHAR
where you add the color hex value prepended with the #
sign and no quotes.
Example:
nodedef> name,label,color VARCHAR
a,"Apple",#00ffdd
b,"Banana",#00ddff
c,"Cherry",#dd00ff
d,"Did it!",#0012ca
e,"Ed 209",#121212
edgedef> node1,node2,weight
a,b,2
b,c,30
b,d,0.4
d,e,200
Edit:
For a more informed answer take a look at the Gephi documentation. The color values in the link are rgb triples but I tried with hex and it worked
Upvotes: 3