Thist {Tmisc} | R Documentation |
Histograms with overlays
Description
Plot a histogram with either a normal distribution or density curve overlay.
Usage
Thist(x, overlay = "normal", col = "gray80", ...)
Arguments
x |
A numeric vector. |
overlay |
Either "normal" (default) or "density" indicating whether a normal distribution or density curve should be plotted on top of the histogram. |
col |
Color of the histogram bars. |
... |
Other arguments to be passed to |
Examples
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")
[Package Tmisc version 1.0.1 Index]