igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] alternative degree distribution


From: Gábor Csárdi
Subject: Re: [igraph] alternative degree distribution
Date: Mon, 28 Feb 2011 18:14:52 -0500

Hi Simone,

see the 'axes' argument of plot() and the axis() function. Basically
you can add any labels you like.

Best,
GAbor

On Sun, Feb 20, 2011 at 7:24 AM, Simone Gabbriellini
<address@hidden> wrote:
> Hello List,
>
> I have a vector of degrees, like:
>
> part=c(1034, 981, 842, 523, 520, 506, 403, 345, 310, 299, 290, 284, 269, 218, 
> 209, 204, 193, 175, 169, 110, 101, 95, 90, 87, 80, 78, 75, 72, 70, 66, 66, 
> 61, 54, 54, 46, 45, 44, 43, 42, 40, 39, 37, 35, 35, 35, 34, 34, 32, 29, 28, 
> 27, 26, 25, 25, 24, 21, 21, 20, 19, 18, 18, 18, 18, 16, 16, 16, 16, 14, 14, 
> 14, 13, 13, 12, 12, 11, 11, 10, 9, 9, 9, 9, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 
> 7, 6, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 
> 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 
> 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 
> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
>
> I am calculating its distribution like:
>
> d<-table(part)
> dd<-as.numeric(d)/sum(as.numeric(d))
>
> and then I plot the result in log scale, trying to fit it with power.law.fit
>
> I have a question regarding the plot. In the x scale, the largest value is 
> something like 60, which is the length of table(part), but it would be more 
> meaningful with the actual degree values, so I can read the plot like, for 
> example, "the probability of a node with degree 1034 is 0.005..."
>
> Is there a way to force the plot use the dimnames(d) list?
>
> best,
> Simone
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM



reply via email to

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