histplot(formula, data, prepanel = prepanel.histplot, panel = panel.histplot, nbins = 5, h, x0 = -h/1000, breaks, prob = T, aspect = "fill", ...)
~ x | g1 * g2 * ...
g1
,
g2
, ... may be omitted.
The
x
variable is a numeric response and is the data used to
construct each histogram.
Variables on the right hand side of the vertical bar are factors or shingles,
and are used to parcel the
x
values out to various panels.
If there are no given variables the initial ~ may be omitted.
x0 + n * h
.
true
(the default) plot a true histogram.
The vertical axis has a
relative frequency density
scale, so the product of the dimensions of any panel gives the
relative frequency. Hence the total area under the histogram
is 1 and it is directly comparable with most other estimates
of the probability density function.
false
plot the counts in the bins.
trellis.args
for details.
trellis
,
which is automatically plotted by
print.trellis
.
If
breaks
is specified, those breakpoints are used. Otherwise if
h
is specified, a regular grid of bins is used with width
h
.
If neither
breaks
nor
h
is specified,
nbins
is used to select
a suitable
h
. Beware of using bandwidth selection algorithms to
choose
h
, as the data will be split, possibly unevenly, across panels.
Attempts to use unequally spaced breaks with
prob=F
will be honoured
with a warning, but this is strongly discouraged as misleading.