l_layer.density | R Documentation |
Layer a line that represents a kernel density estimate.
## S3 method for class 'density'
l_layer(widget, x, ...)
widget |
widget path as a string or as an object handle |
x |
object from |
... |
additional arguments, often state definition for the basic layering function |
layer object handle, layer id
density
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.