l_layer.density: Layer Method for Kernel Density Estimation

View source: R/l_layer.R

l_layer.densityR Documentation

Layer Method for Kernel Density Estimation

Description

Layer a line that represents a kernel density estimate.

Usage

## S3 method for class 'density'
l_layer(widget, x, ...)

Arguments

widget

widget path as a string or as an object handle

x

object from density of class "density"

...

additional arguments, often state definition for the basic layering function

Value

layer object handle, layer id

See Also

density

Examples

if(interactive()){
  d <- density(faithful$eruptions, bw = "sj")
  h <- l_hist(x = faithful$eruptions, yshows="density")
  l <- l_layer.density(h, d, color="steelblue", linewidth=3)
  # or l <- l_layer(h, d, color="steelblue", linewidth=3)
}

loon documentation built on July 9, 2023, 5:48 p.m.