Skip to content

Commit e1f28cd

Browse files
spec: add violin-swarm specification (#3528)
## New Specification: `violin-swarm` Related to #3526 --- ### specification.md # violin-swarm: Violin Plot with Overlaid Swarm Points ## Description A violin plot with individual data points overlaid as a swarm plot, combining smooth kernel density estimation with raw data visibility. The violin shape shows the distribution density while the swarm points reveal actual observations, enabling viewers to see both the overall distribution pattern and individual data values simultaneously. This hybrid approach provides maximum transparency, showing exactly how many observations exist at each level while maintaining the smooth distribution visualization. ## Applications - Comparing gene expression levels across treatment conditions in biological research - Analyzing response time distributions across experimental groups while showing individual trials - Visualizing patient biomarker values across clinical groups with full data transparency - Presenting survey response distributions where sample sizes vary between groups ## Data - `category` (categorical) - Group labels for comparison on the categorical axis - `value` (numeric) - Continuous variable values shown on the value axis - Size: 20-200 observations per category, 2-5 categories - Example: Reaction times (ms) across 4 experimental conditions with 50 observations each ## Notes - Overlay swarm points on top of the violin, centered within the violin shape - Use transparency on the violin (alpha 0.3-0.5) so swarm points remain visible - Size swarm points appropriately to avoid excessive overlap while remaining visible - Consider using a contrasting color for points vs violin fill - Swarm points should spread horizontally to avoid overlap, staying within the violin boundary --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20858467660)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 9f41b9f commit e1f28cd

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# violin-swarm: Violin Plot with Overlaid Swarm Points
2+
3+
## Description
4+
5+
A violin plot with individual data points overlaid as a swarm plot, combining smooth kernel density estimation with raw data visibility. The violin shape shows the distribution density while the swarm points reveal actual observations, enabling viewers to see both the overall distribution pattern and individual data values simultaneously. This hybrid approach provides maximum transparency, showing exactly how many observations exist at each level while maintaining the smooth distribution visualization.
6+
7+
## Applications
8+
9+
- Comparing gene expression levels across treatment conditions in biological research
10+
- Analyzing response time distributions across experimental groups while showing individual trials
11+
- Visualizing patient biomarker values across clinical groups with full data transparency
12+
- Presenting survey response distributions where sample sizes vary between groups
13+
14+
## Data
15+
16+
- `category` (categorical) - Group labels for comparison on the categorical axis
17+
- `value` (numeric) - Continuous variable values shown on the value axis
18+
- Size: 20-200 observations per category, 2-5 categories
19+
- Example: Reaction times (ms) across 4 experimental conditions with 50 observations each
20+
21+
## Notes
22+
23+
- Overlay swarm points on top of the violin, centered within the violin shape
24+
- Use transparency on the violin (alpha 0.3-0.5) so swarm points remain visible
25+
- Size swarm points appropriately to avoid excessive overlap while remaining visible
26+
- Consider using a contrasting color for points vs violin fill
27+
- Swarm points should spread horizontally to avoid overlap, staying within the violin boundary
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Specification-level metadata for violin-swarm
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: violin-swarm
5+
title: Violin Plot with Overlaid Swarm Points
6+
7+
# Specification tracking
8+
created: 2026-01-09T16:30:41Z
9+
updated: null
10+
issue: 3526
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+
- violin
18+
- swarm
19+
data_type:
20+
- numeric
21+
- categorical
22+
domain:
23+
- statistics
24+
- research
25+
- general
26+
features:
27+
- distribution
28+
- comparison
29+
- combined

0 commit comments

Comments
 (0)