[R] Shift the normal curve to the top or near to the top of the histogram
AbouEl-Makarim Aboueissa
abouelmakarim1962 at gmail.com
Mon Sep 25 01:35:28 CEST 2017
Dear All:
One more thing.
I want to add the normal curve to the histogram. Is there away to stretch
the peak of the curve to the top of the histogram or at least near to the
top of the histogram.
Please see the code below.
Lizard.tail.lengths <- c(6.2, 6.6, 7.1, 7.4, 7.6, 7.9, 8, 8.3, 8.4, 8.5,
8.6,8.8, 8.8, 9.1, 9.2, 9.4, 9.4, 9.7, 9.9, 10.2, 10.4, 10.8,11.3, 11.9)
x<-seq(5,12, 0.001)
hist(Lizard.tail.lengths, main = "Normal Probability Plot of Lizard Tail
Lengths")
curve(dnorm(x ,mean=mean(Lizard.tail.lengths),sd=sd(Lizard.tail.lengths)),
add=TRUE, col=2, lwd = 2)
with many thanks
abou
______________________
AbouEl-Makarim Aboueissa, PhD
Professor of Statistics
Department of Mathematics and Statistics
University of Southern Maine
[[alternative HTML version deleted]]
More information about the R-help
mailing list