This is a position adjustment specifically for geom_density_ridges() and related geoms. It only jitters the points drawn by these geoms, if any. If no points are present, the plot remains unchanged. The effect is similar to position_points_jitter(), only that by default the points lie all underneath the baseline of each individual ridgeline.

position_raincloud(
width = 0,
height = 0.4,
ygap = 0.05,
seed = NULL
)

## Arguments

width Width for horizontal jittering. By default set to 0. Total height of point cloud. By default 0.4. Vertical gap between ridgeline baseline and point cloud. If TRUE, adjusts vertical lines (as are drawn for quantile lines, for example) to align with the point cloud. Random seed. See position_points_jitter.

## Details

The idea for this position adjustment comes from Micah Allen, who proposed this type of plot in a blog post on March 15, 2018.

Other position adjustments for ridgeline plots: position_points_jitter, position_points_sina
library(ggplot2)
#> Picking joint bandwidth of 0.181