0

I am working with the igraph package to visualize some weighted networks with very specific structures. The networks always consist in a "central" vertex which is connected to all other vetrices in the graph. The other vertices may or may not be connected among themselves, but they are always connected with the "central" vertex. I use the Louvain algorithm to find groups of densely connected vertices in these graphs while taking into account the weights of the edges.

After clustering the graph, I usually manually set the "central" vertex in its own cluster. Putting it in only 1 cluster does not really make sense for my application. The objective of setting the "central" vertex apart is to manually consider it as part of all clusters in downstream analyses. There is probably a better algorithm than Louvain to cluster graphs with this structure, but I did not find anything better inside igraph from what I could see. Anyway, to visualize the graph I assign new edge weights based on cluster membership as shown in this post and run the fruchterman.reingold layout algorithm. I get a nice graph in which Louvain clusters of vertices are actually grouped together in the visualization. However, I would like the lone "central" vertex to always appear in the center of the plot. How could I achieve this? I have created some drawings to exemplify what I'm getting right now and the desired output.

Current: current

Desired: desired

MikeKatz45
  • 545
  • 5
  • 16
  • Please give us an example of your data so that we can help you. Use `dput(G)` to make a text version of your graph and paste the results into your question. – G5W Nov 16 '20 at 23:48
  • A question: In your example, the clusters have no edges between them. The only edges are within a cluster or from a cluster to the central node. Is that going to be true in general? – G5W Nov 16 '20 at 23:57
  • @G5W no, this is not true in general, there will be edges between clusters. I'll try to post some data as soon as possible – MikeKatz45 Nov 17 '20 at 03:09

0 Answers0