[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Re: plotting_clusters_on_a_graph

From: harun pirim
Subject: [igraph] Re: plotting_clusters_on_a_graph
Date: Sun, 29 Aug 2010 12:53:31 -0500

I found a code in igraph manual given below. Is there a way to make the nodes of the same color come closer to each other on the graph layout?



# plot a random graph, different color for each component
g <- erdos.renyi.game(100, 1/100)
comps <- clusters(g)$membership
colbar <- rainbow(max(comps)+1)
V(g)$color <- colbar[comps+1]
plot(g, layout=layout.fruchterman.reingold, vertex.size=5, vertex.label=NA)

On Fri, Aug 27, 2010 at 10:56 AM, harun pirim <address@hidden> wrote:
Hi All,

I need to figure out a way of plotting clusters on a graph. I use R.
In the plot I will have the network on the background and circles over the vertices that make up the clusters.
Is there an easy way to to this? Even it is ok to color the vertices of the same cluster having different colors for each cluster.
I have the graph g, and the membership vector m.

Thank you,

Harun Pirim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]