I'm trying to do something very simple... I wan to plot a histogram where the y axis represent the percentage of the total sample that each bin represents.
I know how to plot a histogram with the counts and density... but can't find anything that gives me perenct of sample on the y axis. Any help is appriciated Below is the script I'm working with par(mfrow=c(1,2)) hist(ISIS$ASH_BA1K_ISIS[ISIS$Pest_Status=="-1"], main="Ash BA 1K Negative Detection", xlab="ASH BA 1K") lines(density(ISIS$ASH_BA1K_ISIS), col="blue") hist(ISIS$ASH_BA1K_ISIS[ISIS$Pest_Status=="1"], main="Ash BA 1K Positive Detection", xlab="Ash BA 1K") lines(density(ISIS$ASH_BA1K_ISIS), col="red") -- View this message in context: http://r.789695.n4.nabble.com/Ploting-Histogram-with-Y-axis-is-percentage-of-sample-for-each-bin-tp3333961p3333961.html Sent from the R help mailing list archive at Nabble.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.