0

I have to visualize a network and I am using igraph.

Each of my vertices has an attribute that groups vertices into clusters. I would like to layout the graph according to the links, but I would also retain the attribute grouping, so that, for instance, vertices with a label "a" does not get mixed with vertices with label "b".

Is there any option other than tkplot() and manually adjust the result, retrieve the coordinates and plot the final result?

user299791
  • 2,021
  • 3
  • 31
  • 57

1 Answers1

0

Here you can find two solutions: either to set the between-cluster and within-cluster edge weights, and apply a spring force layout; or iterate over clusters, and apply layout.norm() to set each cluster to a specific area of the plot.

Community
  • 1
  • 1
deeenes
  • 4,148
  • 5
  • 43
  • 59