Well I'm still not sure why you want to do this, but I think you want
something like
degree.dist <- sample(1:20, 1000, replace = T)
D <- as.data.frame(table(degree.dist))
D$degree.dist as.numeric(D$degree.dist)
qplot(degree.dist, Freq, data=D, geom = 'point') + scale_x_log10() +
scale_y_log10()
Again, I think something like
qplot(degree.dist, geom = 'freqpoly', binwidth=.125) + scale_x_log10()
+ scale_y_log10()
makes more sense...
-Ista
On Thu, Oct 8, 2009 at 3:37 PM, Khanh Nguyen <
kng...@cs.umb.edu> wrote:
> There was a typo,
>
>> qplot(degree(g), geom = 'histogram') + scale_x_log10() + scale_y_log10()
>
> should be
>
>> qplot(degree.dist, geom = 'histogram') + scale_x_log10() + scale_y_log10()
>
>
>
> On Thu, Oct 8, 2009 at 2:52 PM, knguyen <
nguyen....@gmail.com> wrote:
>>
>> Thank you for all the response. I am sorry for the confusion.
>>
>> Here is what I am trying to do. I want a scatter plot degree vs.
>> counts of a graph. (hence, the histogram of the degree distribution).
>>
>> An example:
>>
>> > degree.dist <- sample(1:20, 1000, replace = T) # sample degree
>> > distribution
>>
>> > qplot(degree(g), geom = 'histogram') + scale_x_log10() + scale_y_log10()
>>
>> the last step is what I need, but I'd like a scatter plot instead of a
>> bar chart. Is it possible?
>>
>> Thanks.
>>
>> -k
>> - Hide quoted text -