Description Usage Arguments See Also Examples
Plot a univariate density with its hpd shaded
1 2 |
x |
Vector of samples to be plotted |
dens |
Density object of x (optional) |
hpd |
Vector containing end points of the hpd region, must have an even length (optional) |
col1 |
Color of the non-shaded portion of the plot |
col2 |
Color of the shaded portion |
multiply |
Logical, if true multiply col1 with col2 and set new color to col2, otherwise don't |
fade |
Numeric in [0, 1], the degree of transparency to affect col1 and col2, ranging from 0 (totally transparent) to 1 (opaque), defaults to 1 |
add |
Logical, should the plot be added to the current one |
... |
Extra arguments to pass to plot() |
hpd_uni, hpd_mult, col_dens, col_mult, col_fade
1 2 3 4 5 6 7 8 9 10 11 12 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.