1- # Per-library metadata for altair implementation of heatmap-cohort-retention
2- # Auto-generated by impl-generate.yml
3-
41library : altair
52specification_id : heatmap-cohort-retention
63created : ' 2026-03-16T20:46:10Z'
7- updated : ' 2026-03-16T20:46 :10Z'
4+ updated : ' 2026-03-16T20:50 :10Z'
85generated_by : claude-opus-4-5-20251101
96workflow_run : 23165007983
107issue : 4570
@@ -13,7 +10,215 @@ library_version: 6.0.0
1310preview_url : https://storage.googleapis.com/pyplots-images/plots/heatmap-cohort-retention/altair/plot.png
1411preview_thumb : https://storage.googleapis.com/pyplots-images/plots/heatmap-cohort-retention/altair/plot_thumb.png
1512preview_html : https://storage.googleapis.com/pyplots-images/plots/heatmap-cohort-retention/altair/plot.html
16- quality_score : null
13+ quality_score : 86
1714review :
18- strengths : []
19- weaknesses : []
15+ strengths :
16+ - Perfect spec compliance — all required features implemented correctly (triangular
17+ shape, cell annotations, cohort sizes, color bar)
18+ - Excellent data quality with realistic SaaS retention patterns and plausible cohort
19+ sizes
20+ - Clean, idiomatic Altair code with good use of layer composition and conditional
21+ encoding
22+ - Smart conditional text coloring (white on dark, dark on light) for readability
23+ weaknesses :
24+ - Design excellence could be improved — the plot looks like a well-configured default
25+ rather than publication-quality
26+ - No visual emphasis or storytelling to highlight interesting patterns
27+ - Y-axis label font size (15pt) is slightly small relative to other text elements
28+ image_description : ' The plot displays a triangular cohort retention heatmap using
29+ a blue sequential colormap. The title "heatmap-cohort-retention · altair · pyplots.ai"
30+ is centered at the top in large font. The y-axis labeled "Signup Cohort" shows
31+ 10 cohorts from "Jan 2024 (n=1,926)" to "Oct 2024 (n=1,266)" with cohort sizes
32+ in parentheses. The x-axis labeled "Months Since Signup" shows "Month 0" through
33+ "Month 9". Each cell contains a retention percentage value displayed in bold text
34+ — white text on darker (high-retention) cells and dark gray text on lighter (low-retention)
35+ cells. The triangular shape is correct: Jan 2024 has all 10 periods while Oct
36+ 2024 has only Month 0. Cells are separated by white borders. A vertical color
37+ bar legend on the right shows "Retention %" ranging from 0 to 100. Period 0 is
38+ always 100% (darkest blue), with realistic decay patterns across subsequent months.'
39+ criteria_checklist :
40+ visual_quality :
41+ score : 28
42+ max : 30
43+ items :
44+ - id : VQ-01
45+ name : Text Legibility
46+ score : 7
47+ max : 8
48+ passed : true
49+ comment : Font sizes explicitly set throughout (title 28, axis titles 22, axis
50+ labels 15-17, cell text 16). Y-axis labels at 15pt slightly small.
51+ - id : VQ-02
52+ name : No Overlap
53+ score : 6
54+ max : 6
55+ passed : true
56+ comment : No overlapping text anywhere
57+ - id : VQ-03
58+ name : Element Visibility
59+ score : 6
60+ max : 6
61+ passed : true
62+ comment : Cells well-sized with clear color differentiation and white borders
63+ - id : VQ-04
64+ name : Color Accessibility
65+ score : 4
66+ max : 4
67+ passed : true
68+ comment : Blues colormap is colorblind-safe with conditional text color for
69+ readability
70+ - id : VQ-05
71+ name : Layout & Canvas
72+ score : 3
73+ max : 4
74+ passed : true
75+ comment : Good layout, triangular shape inherently leaves empty space in lower-right
76+ - id : VQ-06
77+ name : Axis Labels & Title
78+ score : 2
79+ max : 2
80+ passed : true
81+ comment : ' Descriptive labels: Months Since Signup, Signup Cohort'
82+ design_excellence :
83+ score : 11
84+ max : 20
85+ items :
86+ - id : DE-01
87+ name : Aesthetic Sophistication
88+ score : 5
89+ max : 8
90+ passed : true
91+ comment : Blues colormap well-chosen, white cell borders, conditional text
92+ coloring. Above defaults but not publication-level.
93+ - id : DE-02
94+ name : Visual Refinement
95+ score : 3
96+ max : 6
97+ passed : true
98+ comment : View stroke removed, white cell separators. Some refinement but could
99+ be further polished.
100+ - id : DE-03
101+ name : Data Storytelling
102+ score : 3
103+ max : 6
104+ passed : true
105+ comment : Triangular shape and color gradient guide the eye, but no explicit
106+ focal point or emphasis on key insights.
107+ spec_compliance :
108+ score : 15
109+ max : 15
110+ items :
111+ - id : SC-01
112+ name : Plot Type
113+ score : 5
114+ max : 5
115+ passed : true
116+ comment : Correct triangular heatmap
117+ - id : SC-02
118+ name : Required Features
119+ score : 4
120+ max : 4
121+ passed : true
122+ comment : ' All spec features present: triangular shape, cell annotations, cohort
123+ sizes, color bar'
124+ - id : SC-03
125+ name : Data Mapping
126+ score : 3
127+ max : 3
128+ passed : true
129+ comment : X=periods, Y=cohorts, correct mapping
130+ - id : SC-04
131+ name : Title & Legend
132+ score : 3
133+ max : 3
134+ passed : true
135+ comment : Title format correct, color bar legend labeled Retention %
136+ data_quality :
137+ score : 15
138+ max : 15
139+ items :
140+ - id : DQ-01
141+ name : Feature Coverage
142+ score : 6
143+ max : 6
144+ passed : true
145+ comment : Full retention decay, cohort variation, triangular shape, period
146+ 0 always 100%
147+ - id : DQ-02
148+ name : Realistic Context
149+ score : 5
150+ max : 5
151+ passed : true
152+ comment : Realistic SaaS monthly cohort retention with plausible user counts
153+ - id : DQ-03
154+ name : Appropriate Scale
155+ score : 4
156+ max : 4
157+ passed : true
158+ comment : Realistic retention values and cohort sizes
159+ code_quality :
160+ score : 10
161+ max : 10
162+ items :
163+ - id : CQ-01
164+ name : KISS Structure
165+ score : 3
166+ max : 3
167+ passed : true
168+ comment : ' Clean linear flow: imports, data, chart, save'
169+ - id : CQ-02
170+ name : Reproducibility
171+ score : 2
172+ max : 2
173+ passed : true
174+ comment : np.random.seed(42) set
175+ - id : CQ-03
176+ name : Clean Imports
177+ score : 2
178+ max : 2
179+ passed : true
180+ comment : All imports used
181+ - id : CQ-04
182+ name : Code Elegance
183+ score : 2
184+ max : 2
185+ passed : true
186+ comment : Clean, well-structured, appropriate complexity
187+ - id : CQ-05
188+ name : Output & API
189+ score : 1
190+ max : 1
191+ passed : true
192+ comment : Saves plot.png with scale_factor=3.0 and plot.html
193+ library_mastery :
194+ score : 7
195+ max : 10
196+ items :
197+ - id : LM-01
198+ name : Idiomatic Usage
199+ score : 4
200+ max : 5
201+ passed : true
202+ comment : ' Good declarative API usage: mark_rect + mark_text layering, proper
203+ encoding types, alt.Scale/Axis'
204+ - id : LM-02
205+ name : Distinctive Features
206+ score : 3
207+ max : 5
208+ passed : true
209+ comment : Uses alt.condition for conditional text coloring, layer composition,
210+ configure_view
211+ verdict : REJECTED
212+ impl_tags :
213+ dependencies : []
214+ techniques :
215+ - annotations
216+ - layer-composition
217+ - html-export
218+ patterns :
219+ - data-generation
220+ - iteration-over-groups
221+ dataprep : []
222+ styling :
223+ - custom-colormap
224+ - edge-highlighting
0 commit comments