Skip to content

Commit ff4cb33

Browse files
spec: add violin-grouped-swarm specification (#3530)
## New Specification: `violin-grouped-swarm` Related to #3529 --- ### specification.md # violin-grouped-swarm: Grouped Violin Plot with Swarm Overlay ## Description A grouped violin plot with individual data points overlaid as swarm points, showing distributions across two categorical dimensions simultaneously. Multiple violin plots are arranged by category on the x-axis and grouped by a secondary variable using color/hue, with swarm points revealing the underlying raw data. This visualization combines distribution shape visualization with complete data transparency, ideal for comparing how distributions differ across multiple factors. ## Applications - Comparing drug efficacy distributions across multiple dosage levels and treatment groups - Analyzing performance metrics across departments and employee seniority levels - Visualizing experimental results across conditions and time points in research studies - Comparing customer satisfaction scores across product categories and regions ## Data - `category` (categorical) - Primary grouping variable for x-axis positioning - `group` (categorical) - Secondary grouping variable for hue/color differentiation - `value` (numeric) - Continuous variable values shown on the value axis - Size: 20-150 observations per category-group combination, 2-4 categories, 2-4 groups - Example: Response times across 3 task types and 2 expertise levels with 40 observations each ## Notes - Use distinct colors for each group with a clear legend - Apply transparency to violins (alpha 0.4-0.6) so swarm points remain visible - Size swarm points appropriately (smaller than single-category version due to space constraints) - Ensure adequate spacing between grouped violins to prevent overlap - Swarm points should match the hue of their corresponding violin - Consider dodging swarm points to align with their respective violin position --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20858679946)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent e1f28cd commit ff4cb33

2 files changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# violin-grouped-swarm: Grouped Violin Plot with Swarm Overlay
2+
3+
## Description
4+
5+
A grouped violin plot with individual data points overlaid as swarm points, showing distributions across two categorical dimensions simultaneously. Multiple violin plots are arranged by category on the x-axis and grouped by a secondary variable using color/hue, with swarm points revealing the underlying raw data. This visualization combines distribution shape visualization with complete data transparency, ideal for comparing how distributions differ across multiple factors.
6+
7+
## Applications
8+
9+
- Comparing drug efficacy distributions across multiple dosage levels and treatment groups
10+
- Analyzing performance metrics across departments and employee seniority levels
11+
- Visualizing experimental results across conditions and time points in research studies
12+
- Comparing customer satisfaction scores across product categories and regions
13+
14+
## Data
15+
16+
- `category` (categorical) - Primary grouping variable for x-axis positioning
17+
- `group` (categorical) - Secondary grouping variable for hue/color differentiation
18+
- `value` (numeric) - Continuous variable values shown on the value axis
19+
- Size: 20-150 observations per category-group combination, 2-4 categories, 2-4 groups
20+
- Example: Response times across 3 task types and 2 expertise levels with 40 observations each
21+
22+
## Notes
23+
24+
- Use distinct colors for each group with a clear legend
25+
- Apply transparency to violins (alpha 0.4-0.6) so swarm points remain visible
26+
- Size swarm points appropriately (smaller than single-category version due to space constraints)
27+
- Ensure adequate spacing between grouped violins to prevent overlap
28+
- Swarm points should match the hue of their corresponding violin
29+
- Consider dodging swarm points to align with their respective violin position
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Specification-level metadata for violin-grouped-swarm
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: violin-grouped-swarm
5+
title: Grouped Violin Plot with Swarm Overlay
6+
7+
# Specification tracking
8+
created: 2026-01-09T16:38:22Z
9+
updated: null
10+
issue: 3529
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+
- grouped
28+
- distribution
29+
- comparison

0 commit comments

Comments
 (0)