vtraag/louvain-igraph

plotting issue

Closed this issue · 3 comments

I have a graph with 279 nodes and when I do
partition = louvain.find_partition(G, louvain.ModularityVertexPartition)
it gives me 11 partitions the problem is ig.plot(partition) does not work, I hve tried with 'Zachary' and it is fine. Is there any limitation for the number of clusters it can plot??

I don't believe there is a limit on the number of clusters it can plot. What is the error you get? I'm not sure how many edges you have in your graph? The plotting in igraph can be a bit slow with many edges, especially when autocurve=True, so perhaps you can retry with autocurve=False?

It has around 1500 edges. I waited 3 hours but nothing happened. I tried what you suggested and it works in few seconds now, thank you.

That few seconds is mostly spent in creating a layout. You could also precalculated the layout if you need to plot the graph multiple times. But good to hear you got it working now.