col_dens: col_dens

Description Usage Arguments See Also Examples

Description

Adapted from Arthur Lui

Colors a specified area under a density within an interval by making a call to the polygon function

Usage

1
col_dens(dens, xlim, fill = "black", border = NULL)

Arguments

dens

a density object

xlim

numeric vector of length 2 specifying the interval

fill

color, the color that will fill in the area under the curve, defaults to black

border

color, the outline of the area receives this color, defaults to fill

See Also

col_mult, col_gray, col_fade

Examples

1
2
3
4
x = rnorm(100)
dens = density(x)
plot(dens)
col_dens(dens, c(0, 1), fill = "blue", border = NA)

mickwar/mwBASE documentation built on May 22, 2019, 9:56 p.m.