Re: [R] Barplot for degree distribution

From: kparamas <kparamas_at_asu.edu>
Date: Tue, 26 Apr 2011 21:00:08 -0700 (PDT)

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.

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Wed 27 Apr 2011 - 06:31:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 27 Apr 2011 - 13:20:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive