Methods for constructing blurs, as used in the blur argument to
geom_blur_dots() or stat_mcse_dots().
Supports automatic partial function application with waived arguments.
blur_gaussian(x, r, sd)
blur_interval(x, r, sd, .width = 0.95)<numeric> Vector of positive distances from the center of the dot (assumed to be 0) to evaluate blur function at.
<scalar numeric> Radius of the dot that is being blurred.
<scalar numeric> Standard deviation of the dot that is being blurred.
<scalar numeric> For blur_interval(), a probability giving the width of
the interval.
A vector with the same length as x giving the opacity of the radial
gradient representing the dot at each x value.
These functions are passed x, r, and sd when geom_blur_dots()
draws in order to create a radial gradient representing each dot in the
dotplot. They return values between 0 and 1 giving the opacity of the
dot at each value of x.
blur_gaussian() creates a dot with radius r that has a Gaussian blur with
standard deviation sd applied to it. It does this by calculating
\(\alpha(x; r, \sigma)\), the opacity at distance \(x\) from the center
of a dot with radius \(r\) that has had a Gaussian blur with standard
deviation \(\sigma\) = sd applied to it:
$$ \alpha(x; r, \sigma) = \Phi \left(\frac{x + r}{\sigma} \right) - \Phi \left(\frac{x - r}{\sigma} \right) $$
blur_interval() creates an interval-type representation around the
dot at 50% opacity, where the interval is a Gaussian quantile interval with
mass equal to .width and standard deviation sd.
geom_blur_dots() and stat_mcse_dots() for geometries making use of
blur functions.
# see examples in geom_blur_dots()