Closed johnbyron closed 2 years ago
I'd also really like this kind of feature, probably in a form of a plugin.
I'm currently generating a gexf file with a custom "viz:color" for each node.
Here is a first try to colorize a graph node using a the topic on the node (this topic attribute is defined in the gexf file):
https://gist.github.com/alx/5337474
You'll need d3js to get the color array. I've limited the number of possible colors, but if you remove the condition on line 40, you can get colors for every clusters.
Have fun :)
Alex
That's a very interesting work! Have you ever thought of assigning a color to each node depending on its x-y position? In this way, nodes which are clustered together would have almost the same color.
Thanks :)
I've got an updated version of the code where it's making a ranked topic array, so clusters containing most nodes will be colorized first.
Because you're launching this plugin once the graph is made, it should also be possible to attribute colors depending on nodes position.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
It would be awesome to have a modularity algorithm implemented in sigma.js to color the nodes, highlighting the different communities composing the graph. Is someone working on this? :)