Ridgeline plot
What is a ridgeline plot?
A ridgeline plot, sometimes called a joyplot, displays the distribution of a numeric variable across multiple categories. It works by stacking individual density plots vertically, typically with some overlap to conserve space. This arrangement creates a striking visual effect resembling a series of mountain ranges, where each "ridge" represents the distribution for a different group. Ridgeline plots excel at quickly showing trends, shifts, or changes in distributions across many categories, making it easy to spot patterns that might be harder to discern in separate multiple plots.
Overlap
The ridges in a ridgeline plot are typically overlapped. This overlapping allows for the efficient use of space, while simultaneously making it easier to compare shapes, means, shifts, and differences between categories.
Chart properties
Prop | Default | Description |
---|---|---|
sort | none | none The ridges are arranged in insertion order. ascending The ridges are arranged by mean value from the smallest to largest. descending The ridges are arranged by mean value from the largest to smallest. |
overlap | value | slider Controls the degree of overlap between the series of ridges. |
kernel | gaussian | gaussian Applies a gaussian (or bell-shaped) weighting function centered at each data point. epanechnikov Applies a parabolic-shaped weighting function, optimal for minimizing mean squared error. |
bandwidth | Silverman's rule | Silverman's rule A widely used rule of thumb, assumes approximately normal data, but performs reasonably well for other distributions. Scott's rule Another normal reference rule, similar to Silverman's, that calculates the optimal bandwidth assuming a normal distribution. It is typically marginally wider than Silverman's rule of thumb. manual Adjust the bandwidth manually. |