Skip to content

Modularity #82

Open
johnbyron opened this Issue Mar 22, 2013 · 4 comments

2 participants

@johnbyron

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? :)

@alx
alx commented Apr 8, 2013

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.

@alx
alx commented Apr 8, 2013

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

@johnbyron

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.

@alx
alx commented Apr 10, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.