Please be more specific with your question. Perhaps a simple subset of the data you are trying to plot? Here is some non-specific advice:
Plotting histograms as percentages instead of frequency counts is already an option of the hist function. For example, pop1<-rnorm(100) hist(pop1,freq=F) If you are plotting two histograms side-by-side (on the percentage scale), the y-axis of both plots can be set with the ylim option. For example, par(mfrow=c(1,2)) pop1<-rnorm(100) hist(pop1,freq=F,ylim=c(0,1)) pop2<-rgamma(100,1,1) hist(pop2,freq=F,ylim=c(0,1)) If your question were clearer, I might be able to help in more specific ways. -tgs On Fri, May 14, 2010 at 10:19 AM, Federico Calboli <f.calb...@imperial.ac.uk > wrote: > Hi All, > > I am in the annoying position of having to present some data to someone who > seems to be somewhat less than numerate. I need to label the y-axes of a > multhist with the y-axis labeled not as counts but as percentage of a > population. Plotting the standard histogram is in a way fine, all I need is > to: > > -- have a left-handside y-axis labels for pop 1 and a right-handside y-axis > labels for pop2 > -- replace the counts in each axis with population percentages (easy to > calculate, but how to stick them there?) > > Any suggestion would be gratefully received. > > F > > > -- > Federico C. F. Calboli > Department of Epidemiology and Biostatistics > Imperial College, St. Mary's Campus > Norfolk Place, London W2 1PG > > Tel +44 (0)20 75941602 Fax +44 (0)20 75943193 > > f.calboli [.a.t] imperial.ac.uk > f.calboli [.a.t] gmail.com > > ______________________________________________ > R-help@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. > [[alternative HTML version deleted]] ______________________________________________ R-help@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.