Layer a line that represents a kernel density estimate.
# S3 method for density l_layer(widget, x, ...)
widget path as a string or as an object handle
object from density of class "density"
density
"density"
additional arguments, often state definition for the basic layering function
layer object handle, layer id
density, l_layer
l_layer
# NOT RUN { 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) } # }
Run the code above in your browser using DataLab