Hi, Please help! I need to plot a degree distribution.
so far (see below) i have the following but the problem: i'm plotting the
graph. instead I need to plot the degree distribution.
library(igraph)
dat<- read.graph(file="tf.net", format="pajek")
dat<- as.undirected(dat, mode = c("each"))
is
I think this would be rather something like
abline(v=mean(degree(G)))
Best,
Gabor
On Thu, Mar 3, 2011 at 8:04 PM, Scott Chamberlain
wrote:
> library(igraph)
> G <- erdos.renyi.game(1000, 1/1000) # a random graph
>
> dd1 = degree.distribution(G)
>
> plot(dd1, xlab = "degree", ylab="frequency")
>
library(igraph)
G <- erdos.renyi.game(1000, 1/1000) # a random graph
dd1 = degree.distribution(G)
plot(dd1, xlab = "degree", ylab="frequency")
abline(h = mean(dd1)) # the mean would be a horizontal line
On Thursday, March 3, 2011 at 4:43 PM, kparamas wrote:
> Hi,
>
> I am plotting degree dis
Hi,
I am plotting degree distribution of a graph using the function,
library(igraph)
dd1 = degree.distribution(G)
plot(dd1, xlab = "degree", ylab="frequency")
I would like to plot the mean of the distribution as a vertical line in the
attached plot.
Please let me know how to do this.
Thanks,
K
4 matches
Mail list logo