powered by
Plot a histogram with either a normal distribution or density curve overlay.
Thist(x, overlay = "normal", col = "gray80", ...)
A numeric vector.
Either "normal" (default) or "density" indicating whether a normal distribution or density curve should be plotted on top of the histogram.
Color of the histogram bars.
Other arguments to be passed to hist().
hist()
set.seed(42) x <- rnorm(1000, mean=5, sd=2) Thist(x) Thist(x, overlay="density") Thist(x^2) Thist(x^2, overlay="density", breaks=50, col="lightblue2")
Run the code above in your browser using DataLab