Description Usage Arguments Examples
Adapted from https://stackoverflow.com/questions/20078107/overlay-normal-curve-to-histogram-in-r .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | .hist.plot(
x,
breaks = "Sturges",
freq = FALSE,
include.lowest = TRUE,
normalcurve = TRUE,
kernel = TRUE,
legend = TRUE,
right = TRUE,
density = NULL,
angle = 45,
col = NULL,
border = NULL,
main = paste("Histogram of", xname),
ylim = NULL,
xlab = NULL,
ylab = NULL,
axes = TRUE,
plot = TRUE,
labels = FALSE,
warn.unused = TRUE,
...
)
|
x |
a vector of values for which the histogram is desired. |
breaks |
one of:
In the last three cases the number is a suggestion only; as the
breakpoints will be set to |
freq |
logical; if |
include.lowest |
logical; if |
normalcurve |
Logical. Add normal curve. |
kernel |
Logical.
Add kernel density plot.
This only works if |
legend |
Logical. Add legend. |
right |
logical; if |
density |
the density of shading lines, in lines per inch.
The default value of |
angle |
the slope of shading lines, given as an angle in degrees (counter-clockwise). |
col |
a colour to be used to fill the bars.
The default of |
border |
the color of the border around the bars. The default is to use the standard foreground color. |
main |
main title and axis labels: these arguments to
|
ylim |
the range of x and y values with sensible defaults.
Note that |
xlab |
main title and axis labels: these arguments to
|
ylab |
main title and axis labels: these arguments to
|
axes |
logical. If |
plot |
logical. If |
labels |
logical or character string. Additionally draw labels on top
of bars, if not |
warn.unused |
logical. If |
... |
further arguments and graphical parameters passed to
|
1 2 | x <- rnorm(n = 1000, mean = 100, sd = 15)
.hist.plot(x = x, freq = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.