Earlier, I posted the following question: I want to superimpose histograms from three populations onto the same graph, changing the shading of the bars for each population. After consulting the help files and the archives I cannot find out how to do this (seemly) simple graph. To be clear, I want - a single x axis (from -3 to 18) - three groups of bars forming the histograms of each population (they will not overlap much, but this is a detail) - the bars from each histogram having different shadings or other visually distinguishing features. Gabor Grothendieck [EMAIL PROTECTED] pointed to some code to to this but I have found another way that works even easier. hist(x[sel1],xlim=c(a,b),ylim=c(A,B)) - this plots the histogram for the first group (indexed by sel1) but with an x axis and a y axis that spans the entire range. par(new=T) - to keep on the same graph hist(x[sel2],main=Null,xlab=NULL,ylab=NULL,axes=F) -superimposes the second histogram par(new=T) - to keep on the same graph hist(x[sel3],main=Null,xlab=NULL,ylab=NULL,axes=F) -superimposes the third histogram
Bill Shipley North American Editor, Annals of Botany Editor, "Population and Community Biology" series, Springer Publishing Département de biologie, Université de Sherbrooke, Sherbrooke (Québec) J1K 2R1 CANADA [EMAIL PROTECTED] http://callisto.si.usherb.ca:8080/bshipley/ [[alternative HTML version deleted]]
______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
