shist | R Documentation |
A stacked histogram with density curve.
shist(
x,
...,
col = grey.colors(length(x) + 1L),
loess = TRUE,
total = TRUE,
xlim = NULL,
ylim = NULL,
heights = NULL,
heights.main = 0.5,
reset_par = TRUE
)
x |
a list of numeric vectors for which the histogram is desired |
... |
additional parameters passed to |
col |
a vector of colors for each histogram |
loess |
logical; if |
total |
logical; if |
xlim, ylim |
the x- and y-axis limits (if given, applied to all plots) |
heights |
an optional vector of values, usually in |
heights.main |
if |
reset_par |
logical; if |
A list of length length(x)
containing the return value of
hist
for each element of x
.
set.seed(1)
x <- lapply(sample(1:10, 4), rpois, n = 500)
shist(x)
shist(x, heights.main = 0.75)
shist(x, heights = c(5,1,1,1,3))
shist(x, col = terrain.colors(length(x)), total = FALSE,
ylim = c(0, 200), las = 1L, breaks = 10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.