Skip to content
Back to skills

Ggridges

ASecurity

R ggridges package for ridgeline plots. Use for creating ridgeline/joy plots showing distributions.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 5, 2026
data

Security analysis

A100/100

Scanned June 5, 2026

npx -y skills add LeoLin990405/r-analytics-skill --skill ggridges --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ggridges?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ggridges
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/leolin990405-ggridges/badge)](https://www.skillsdirectory.com/skills/leolin990405-ggridges)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ggridges
description: R ggridges package for ridgeline plots. Use for creating ridgeline/joy plots showing distributions.
---

# ggridges

Ridgeline plots in ggplot2.

## Basic Ridgeline

```r
library(ggplot2)
library(ggridges)

ggplot(diamonds, aes(x = price, y = cut)) +
  geom_density_ridges()
```

## With Fill

```r
ggplot(diamonds, aes(x = price, y = cut, fill = cut)) +
  geom_density_ridges() +
  theme_ridges() +
  theme(legend.position = "none")
```

## Gradient Fill

```r
ggplot(diamonds, aes(x = price, y = cut, fill = stat(x))) +
  geom_density_ridges_gradient() +
  scale_fill_viridis_c(option = "C")
```

## Quantile Lines

```r
ggplot(diamonds, aes(x = price, y = cut)) +
  geom_density_ridges(
    quantile_lines = TRUE,
    quantiles = c(0.25, 0.5, 0.75)
  )
```

## Jittered Points

```r
ggplot(diamonds, aes(x = price, y = cut)) +
  geom_density_ridges(
    jittered_points = TRUE,
    point_size = 0.5,
    point_alpha = 0.3
  )
```

## Raincloud Plots

```r
ggplot(diamonds, aes(x = price, y = cut)) +
  geom_density_ridges(
    jittered_points = TRUE,
    position = position_points_jitter(width = 0.05, height = 0),
    point_shape = '|',
    point_size = 3,
    alpha = 0.7
  )
```

## Histogram Ridges

```r
ggplot(diamonds, aes(x = price, y = cut, fill = cut)) +
  geom_density_ridges(stat = "binline", bins = 30) +
  theme_ridges()
```

## Scale and Overlap

```r
ggplot(diamonds, aes(x = price, y = cut)) +
  geom_density_ridges(
    scale = 2,      # Overlap amount
    rel_min_height = 0.01  # Cut off tails
  )
```

## Bandwidth

```r
ggplot(diamonds, aes(x = price, y = cut)) +
  geom_density_ridges(bandwidth = 500)
```

## Theme

```r
# Built-in theme
ggplot(diamonds, aes(x = price, y = cut)) +
  geom_density_ridges() +
  theme_ridges(grid = FALSE, center_axis_labels = TRUE)
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.