Description Usage Arguments Computed variables
Unlike normal [geom_density] or [stat_density] the density estimate does not go artificially decrease at the left bound 0. Note that this function only works nicely if the data starts left with 0. Possibly atoms at z=0 should ideally be removed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
bw |
The smoothing bandwidth to be used. If numeric, the standard deviation of the smoothing kernel. If character, a rule to choose the bandwidth, as listed in [stats::bw.nrd()]. |
adjust |
A multiplicate bandwidth adjustment. This makes it possible to adjust the bandwidth while still using the a bandwidth estimator. For example, 'adjust = 1/2' means use half of the default bandwidth. |
kernel |
Kernel. See list of available kernels in [density()]. |
n |
number of equally spaced points at which the density is to be estimated, should be a power of two, see [density()] for details |
trim |
If 'FALSE', the default, each density is computed on the full range of the data. If 'TRUE', each density is computed over the range of that group: this typically means the estimated x values will not line-up, and hence you won't be able to stack density values. This parameter only matters if you are displaying multiple densities in one plot or if you are manually adjusting the scale limits. |
density estimate
density * number of points - useful for stacked density plots
density estimate, scaled to maximum of 1
alias for 'scaled', to mirror the syntax of ['stat_bin()']
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.