[R] Barplot for degree distribution

kparamas kparamas at asu.edu
Wed Apr 27 06:00:08 CEST 2011


Thanks for the info.

I have 2 degree distributions that have different degrees.

I want both these barplots to have the same axes. Is this possible?
I have used xlim and ylim. ylim works fine for both plots
But xlim I am not getting the values till 60. And if I give names(dd) <-
0:60 it gives an error.

library(igraph)
names(dd1) <- 0:18
barplot(dd1, cex.names = 0.8, ylim = c(0, 0.3), xlim = c(0, 60)
            cex.axis = 0.8, xlab = 'Degrees', ylab = 'Relative frequency') 

names(dd2) <- 0:50
barplot(dd2, cex.names = 0.8, ylim = c(0, 0.3), xlim = c(0, 60)
            cex.axis = 0.8, xlab = 'Degrees', ylab = 'Relative frequency') 

--
View this message in context: http://r.789695.n4.nabble.com/Barplot-for-degree-distribution-tp3476831p3477191.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list