fill.density: Fill-in the density plot

Description Usage Arguments References

View source: R/fill-density.R

Description

Fill-in the density plot

Usage

1
2
fill.density(density, min.x, max.x, col = "lightgray", ..., border = NA,
  add = TRUE, drawagain = TRUE, lcol = "black")

Arguments

density

output of density function or a data.frame with x and y columns where x are data points and y is density

min.x, max.x

boundries of area to fill-in; if not provided the whole density is filled; if only one of them is provided the second one is defined as the smallest or the largest x value

col, border, ...

parameters of polygon function

add

if TRUE (default) the filled area is added to already existing plot

drawagain

if TRUE (default) lines of density plot are drawn over the existing plot for better outlook

lcol

col parameter for plot.density

References

http://stackoverflow.com/questions/3494593/shading-a-kernel-density-plot-between-two-points


twolodzko/twextras documentation built on May 3, 2019, 1:52 p.m.