Skip to content

Commit d33dde8

Browse files
spec: add area-stacked-confidence specification (#3551)
## New Specification: `area-stacked-confidence` Related to #3549 --- ### specification.md # area-stacked-confidence: Stacked Area Chart with Confidence Bands ## Description A stacked area chart that displays multiple data series as cumulative areas, with each series surrounded by uncertainty or confidence bands. This visualization combines the composition insight of stacked areas with the statistical rigor of confidence intervals, making it ideal for showing how parts contribute to a whole while simultaneously communicating uncertainty in each component. The bands reveal where estimates are precise versus uncertain across the stacked series. ## Applications - Forecasting market share by competitor with prediction intervals - Displaying portfolio allocation over time with risk bands for each asset class - Showing energy consumption breakdown by source with measurement uncertainty - Visualizing population projections by age group with demographic uncertainty ## Data - `x` (datetime/numeric) - continuous axis values, typically time periods - `y1, y2, y3, ...` (numeric) - central values for each series to be stacked - `y1_lower, y1_upper, ...` (numeric) - lower and upper bounds of confidence bands for each series - `category` (categorical) - labels identifying each series - Size: 20-100 time points, 2-5 series - Example: quarterly revenue forecasts by product line with 90% prediction intervals ## Notes - Use distinct colors for each series, with matching lighter shades for confidence bands - Semi-transparent fills (alpha 0.2-0.4) for bands to show overlap without obscuring data - Stack order should be consistent between central values and their bands - Consider using gradient fills from lower to upper bound for visual clarity - Include legend identifying each series and what the bands represent - Bands should be symmetric around each series or explicitly labeled if asymmetric --- **Next:** Add `approved` label to the issue to merge this PR. --- :robot: *[spec-create workflow](https://github.com/MarkusNeusinger/pyplots/actions/runs/20866456345)* Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent cd58979 commit d33dde8

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# area-stacked-confidence: Stacked Area Chart with Confidence Bands
2+
3+
## Description
4+
5+
A stacked area chart that displays multiple data series as cumulative areas, with each series surrounded by uncertainty or confidence bands. This visualization combines the composition insight of stacked areas with the statistical rigor of confidence intervals, making it ideal for showing how parts contribute to a whole while simultaneously communicating uncertainty in each component. The bands reveal where estimates are precise versus uncertain across the stacked series.
6+
7+
## Applications
8+
9+
- Forecasting market share by competitor with prediction intervals
10+
- Displaying portfolio allocation over time with risk bands for each asset class
11+
- Showing energy consumption breakdown by source with measurement uncertainty
12+
- Visualizing population projections by age group with demographic uncertainty
13+
14+
## Data
15+
16+
- `x` (datetime/numeric) - continuous axis values, typically time periods
17+
- `y1, y2, y3, ...` (numeric) - central values for each series to be stacked
18+
- `y1_lower, y1_upper, ...` (numeric) - lower and upper bounds of confidence bands for each series
19+
- `category` (categorical) - labels identifying each series
20+
- Size: 20-100 time points, 2-5 series
21+
- Example: quarterly revenue forecasts by product line with 90% prediction intervals
22+
23+
## Notes
24+
25+
- Use distinct colors for each series, with matching lighter shades for confidence bands
26+
- Semi-transparent fills (alpha 0.2-0.4) for bands to show overlap without obscuring data
27+
- Stack order should be consistent between central values and their bands
28+
- Consider using gradient fills from lower to upper bound for visual clarity
29+
- Include legend identifying each series and what the bands represent
30+
- Bands should be symmetric around each series or explicitly labeled if asymmetric
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Specification-level metadata for area-stacked-confidence
2+
# Auto-synced to PostgreSQL on push to main
3+
4+
spec_id: area-stacked-confidence
5+
title: Stacked Area Chart with Confidence Bands
6+
7+
# Specification tracking
8+
created: 2026-01-09T21:45:47Z
9+
updated: null
10+
issue: 3549
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+
- area
18+
- stacked
19+
data_type:
20+
- numeric
21+
- timeseries
22+
domain:
23+
- general
24+
- statistics
25+
- finance
26+
features:
27+
- stacked
28+
- uncertainty
29+
- cumulative
30+
- temporal

0 commit comments

Comments
 (0)