Skip to content

Commit 67a4373

Browse files
spec: add density-rug specification (#3506)
## New Specification: `density-rug` Related to #3505 --- ### specification.md # density-rug: Density Plot with Rug Marks ## Description A kernel density estimation (KDE) plot combined with rug marks along the x-axis, showing both the smoothed probability distribution and the exact location of each individual data point. This combination provides the best of both worlds: the KDE reveals the overall shape, modality, and smoothed density of the distribution, while the rug marks preserve transparency about where actual observations fall, highlighting data density and potential gaps. ## Applications - Exploratory data analysis where understanding both distribution shape and raw data placement matters - Comparing sample distributions while maintaining visibility of actual observation counts and clustering - Quality control analysis to identify process variations alongside individual measurement locations - Academic and research presentations requiring both statistical summaries and data transparency ## Data - `values` (numeric) - The continuous variable to visualize - Size: 30-500 observations recommended (rug marks become cluttered with very large samples) - Example: Response times, measurement errors, test scores, or any continuous variable ## Notes - Display the KDE curve with fill for visual weight and the rug marks as small tick marks along the x-axis - Use semi-transparent fill under the density curve to avoid obscuring the rug - Rug marks should be subtle but visible, with slight transparency for overlapping points - Consider jittering rug marks vertically if using thick ticks to reduce overplotting --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20856587280)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent d42de9b commit 67a4373

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

plots/density-rug/specification.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# density-rug: Density Plot with Rug Marks
2+
3+
## Description
4+
5+
A kernel density estimation (KDE) plot combined with rug marks along the x-axis, showing both the smoothed probability distribution and the exact location of each individual data point. This combination provides the best of both worlds: the KDE reveals the overall shape, modality, and smoothed density of the distribution, while the rug marks preserve transparency about where actual observations fall, highlighting data density and potential gaps.
6+
7+
## Applications
8+
9+
- Exploratory data analysis where understanding both distribution shape and raw data placement matters
10+
- Comparing sample distributions while maintaining visibility of actual observation counts and clustering
11+
- Quality control analysis to identify process variations alongside individual measurement locations
12+
- Academic and research presentations requiring both statistical summaries and data transparency
13+
14+
## Data
15+
16+
- `values` (numeric) - The continuous variable to visualize
17+
- Size: 30-500 observations recommended (rug marks become cluttered with very large samples)
18+
- Example: Response times, measurement errors, test scores, or any continuous variable
19+
20+
## Notes
21+
22+
- Display the KDE curve with fill for visual weight and the rug marks as small tick marks along the x-axis
23+
- Use semi-transparent fill under the density curve to avoid obscuring the rug
24+
- Rug marks should be subtle but visible, with slight transparency for overlapping points
25+
- Consider jittering rug marks vertically if using thick ticks to reduce overplotting
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Specification-level metadata for density-rug
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: density-rug
5+
title: Density Plot with Rug Marks
6+
7+
# Specification tracking
8+
created: 2026-01-09T15:23:23Z
9+
updated: null
10+
issue: 3505
11+
suggested: MarkusNeusinger
12+
13+
# Classification tags (applies to all library implementations)
14+
# See docs/reference/tagging-system.md for detailed guidelines
15+
tags:
16+
plot_type:
17+
- density
18+
- rug
19+
data_type:
20+
- numeric
21+
- continuous
22+
domain:
23+
- statistics
24+
- general
25+
features:
26+
- distribution
27+
- combined

0 commit comments

Comments
 (0)