Description Usage Arguments Details Aesthetics Computed variables See Also Examples
A kernel density estimate, useful for displaying the distribution of variables with underlying smoothness.
1 2 3 4 5 6 7 8 | geom_bkde(mapping = NULL, data = NULL, stat = "bkde",
position = "identity", bandwidth = NULL, range.x = NULL,
na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ...)
stat_bkde(mapping = NULL, data = NULL, geom = "area",
position = "stack", kernel = "normal", canonical = FALSE,
bandwidth = NULL, gridsize = 410, range.x = NULL, truncate = TRUE,
na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, ...)
|
mapping |
Set of aesthetic mappings created by |
data |
The data to be displayed in this layer. There are three options: If A A |
position |
Position adjustment, either as a string, or the result of a call to a position adjustment function. |
bandwidth |
the kernel bandwidth smoothing parameter. see
|
range.x |
vector containing the minimum and maximum values of x at which
to compute the estimate. see |
na.rm |
If |
show.legend |
logical. Should this layer be included in the legends?
|
inherit.aes |
If |
... |
other arguments passed on to |
geom, stat |
Use to override the default connection between
|
kernel |
character string which determines the smoothing kernel. see
|
canonical |
logical flag: if TRUE, canonically scaled kernels are used.
see |
gridsize |
the number of equally spaced points at which to estimate the
density. see |
truncate |
logical flag: if TRUE, data with x values outside the range
specified by range.x are ignored. see |
A sample of the output from geom_bkde()
:
geom_bkde
understands the following aesthetics (required aesthetics
are in bold):
x
y
alpha
color
fill
linetype
size
density estimate
density * number of points - useful for stacked density plots
density estimate, scaled to maximum of 1
See geom_histogram
, geom_freqpoly
for
other methods of displaying continuous distribution.
See geom_violin
for a compact density display.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Loading required package: ggplot2
Bandwidth not specified. Using '0.14', via KernSmooth::dpik.
Bandwidth not specified. Using '0.14', via KernSmooth::dpik.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.