Skip to content

Commit 4a0d133

Browse files
chore(pygal): update quality score 85 and review feedback for heatmap-cohort-retention
1 parent 2c41aef commit 4a0d133

1 file changed

Lines changed: 69 additions & 68 deletions

File tree

plots/heatmap-cohort-retention/metadata/pygal.yaml

Lines changed: 69 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
library: pygal
22
specification_id: heatmap-cohort-retention
33
created: '2026-03-16T20:46:42Z'
4-
updated: '2026-03-16T20:50:54Z'
4+
updated: '2026-03-16T21:00:33Z'
55
generated_by: claude-opus-4-5-20251101
66
workflow_run: 23165008448
77
issue: 4570
@@ -13,101 +13,102 @@ preview_html: https://storage.googleapis.com/pyplots-images/plots/heatmap-cohort
1313
quality_score: 85
1414
review:
1515
strengths:
16-
- Excellent spec compliance — all required features implemented correctly including
17-
triangular shape, cohort sizes, retention percentages in cells, and color bar
18-
- Strong library mastery — properly subclasses pygal Graph class using idiomatic
19-
_plot()/_compute() pattern with native SVG node creation and tooltip system
20-
- Good color design — sequential green colormap with adaptive text contrast ensures
21-
readability across all cells
22-
- Realistic, neutral data — SaaS cohort retention with plausible values and natural
23-
improvement trend
16+
- Excellent spec compliance with all required features present and correctly implemented
17+
- Advanced pygal usage with custom Graph subclass — correct approach for unsupported
18+
chart type
19+
- Strong data storytelling with triangular shape, improvement trend, and cohort
20+
sizes
21+
- Interactive tooltips in SVG/HTML output via pygal _tooltip_data system
22+
- Clean color interpolation with automatic text contrast
2423
weaknesses:
25-
- Design could be elevated to publication quality — the overall aesthetic is good
26-
but not exceptional; needs more intentional visual hierarchy
27-
- Data storytelling is limited — no visual emphasis on key insights like the retention
28-
improvement trend across cohorts
29-
- Custom class adds complexity that deviates from KISS structure
30-
image_description: 'The plot displays a cohort retention heatmap with a triangular
31-
shape. The title reads "heatmap-cohort-retention · pygal · pyplots.ai" centered
32-
at the top. The y-axis is labeled "Signup Cohort" with monthly labels from Jan
33-
2024 to Oct 2024, each showing cohort sizes (e.g., n=1,200). The x-axis header
34-
reads "Months Since Signup" with columns Month 0 through Month 9. Cells are colored
35-
using a sequential green colormap — dark green for 100% retention, progressively
36-
lighter greens for lower values down to ~26%. Each cell displays its retention
37-
percentage as text (white on dark backgrounds, dark on light backgrounds). The
38-
triangular shape is correctly formed: Jan 2024 has 10 columns, each subsequent
39-
cohort has one fewer. A vertical colorbar on the right side shows "Retention %"
40-
with tick marks from 26% to 100%. White borders separate cells with rounded corners.'
24+
- Yellow/gold outlines on diagonal-edge cells from pygal SVG rendering artifact
25+
- Design not fully publication-quality due to rendering artifacts and slightly cramped
26+
colorbar area
27+
- Cohort size labels are small relative to other text
28+
image_description: 'The plot shows a triangular cohort retention heatmap with 10
29+
monthly cohorts (Jan 2024 – Oct 2024) on the y-axis and 10 periods (Month 0 –
30+
Month 9) on the x-axis. The title reads "heatmap-cohort-retention · pygal · pyplots.ai"
31+
at the top. A sequential green colormap ranges from very light green (low retention
32+
~25%) to dark forest green (high retention 100%). Each cell displays the retention
33+
percentage as text, with automatic dark/light text color based on background brightness.
34+
Cohort sizes (e.g., n=1,200) appear below each cohort label on the left. A vertical
35+
colorbar on the right shows "Retention %" with tick marks at 25%, 44%, 63%, 81%,
36+
and 100%. The "SIGNUP COHORT" label is rotated vertically on the left, and "MONTHS
37+
SINCE SIGNUP" appears as a header above the column labels. The triangular shape
38+
is correctly formed with each subsequent cohort having one fewer period. Cells
39+
have rounded corners with white gaps between them. Notable visual artifact: some
40+
cells along the diagonal edge display yellow/gold outlines instead of clean white
41+
borders, likely from pygal''s SVG rendering behavior leaking into the PNG export.'
4142
criteria_checklist:
4243
visual_quality:
43-
score: 28
44+
score: 26
4445
max: 30
4546
items:
4647
- id: VQ-01
4748
name: Text Legibility
4849
score: 7
4950
max: 8
5051
passed: true
51-
comment: Font sizes explicitly set throughout (title 54px, headers ~42px,
52-
row labels ~36px, cell values ~38px). Colorbar labels slightly small at
53-
28px.
52+
comment: Font sizes explicitly set throughout; all text readable. Cohort size
53+
labels slightly small but legible.
5454
- id: VQ-02
5555
name: No Overlap
5656
score: 6
5757
max: 6
5858
passed: true
59-
comment: No overlapping text. Clean cell gaps and spacing.
59+
comment: No overlapping text elements anywhere.
6060
- id: VQ-03
6161
name: Element Visibility
62-
score: 6
62+
score: 5
6363
max: 6
6464
passed: true
65-
comment: All cells clearly visible with good sizing, rounded corners, white
66-
borders.
65+
comment: All cells visible with good color differentiation. Yellow/gold outlines
66+
on diagonal-edge cells are a rendering artifact.
6767
- id: VQ-04
6868
name: Color Accessibility
69-
score: 4
69+
score: 3
7070
max: 4
7171
passed: true
72-
comment: Sequential green colormap is colorblind-friendly. Text color adapts
73-
to background.
72+
comment: Green sequential colormap is colorblind-friendly. Auto text contrast.
73+
Monochromatic limits fine differentiation.
7474
- id: VQ-05
7575
name: Layout & Canvas
7676
score: 3
7777
max: 4
7878
passed: true
79-
comment: Good layout, minor imbalance from empty space in lower-right inherent
80-
to triangular shape.
79+
comment: Good canvas utilization with balanced margins. Some extra space on
80+
right side.
8181
- id: VQ-06
8282
name: Axis Labels & Title
8383
score: 2
8484
max: 2
8585
passed: true
86-
comment: 'Descriptive axis titles: Months Since Signup and Signup Cohort.'
86+
comment: 'Descriptive axis titles: MONTHS SINCE SIGNUP and SIGNUP COHORT.'
8787
design_excellence:
88-
score: 12
88+
score: 13
8989
max: 20
9090
items:
9191
- id: DE-01
9292
name: Aesthetic Sophistication
9393
score: 5
9494
max: 8
9595
passed: true
96-
comment: Custom green colormap, rounded corners, cohort sizes, good typography
97-
hierarchy. Above defaults but not publication-level.
96+
comment: Custom 8-stop green palette, rounded corners, white gaps, clean typography.
97+
Yellow border artifacts prevent higher score.
9898
- id: DE-02
9999
name: Visual Refinement
100100
score: 4
101101
max: 6
102102
passed: true
103-
comment: Default axes hidden, cell gaps for breathing room, clean white background.
103+
comment: White background, no grid/spines, generous whitespace, cell gaps
104+
for visual separation.
104105
- id: DE-03
105106
name: Data Storytelling
106-
score: 3
107+
score: 4
107108
max: 6
108-
passed: false
109-
comment: Triangular shape conveys retention decay. No strong focal point or
110-
highlighted insight.
109+
passed: true
110+
comment: Triangular shape communicates time-based data. Color gradient shows
111+
retention decay. Improvement trend visible.
111112
spec_compliance:
112113
score: 15
113114
max: 15
@@ -123,20 +124,20 @@ review:
123124
score: 4
124125
max: 4
125126
passed: true
126-
comment: 'All features present: triangular shape, retention percentages, cohort
127-
sizes, colormap, colorbar.'
127+
comment: 'All required features present: triangular shape, retention % in
128+
cells, cohort sizes, colorbar, period 0 = 100%.'
128129
- id: SC-03
129130
name: Data Mapping
130131
score: 3
131132
max: 3
132133
passed: true
133-
comment: Cohorts on Y-axis, periods on X-axis. Period 0 always 100%.
134+
comment: 'Correct mapping: cohorts on y, periods on x, color = retention rate.'
134135
- id: SC-04
135136
name: Title & Legend
136137
score: 3
137138
max: 3
138139
passed: true
139-
comment: Correct title format. Colorbar serves as legend.
140+
comment: Title follows exact format. No legend needed for single heatmap.
140141
data_quality:
141142
score: 14
142143
max: 15
@@ -146,31 +147,31 @@ review:
146147
score: 5
147148
max: 6
148149
passed: true
149-
comment: Shows full retention decay, triangular shape, cohort variation, improvement
150-
trend. Could have more dramatic variation.
150+
comment: Shows retention decay, triangular shape, cohort variation, improvement
151+
trend. Could benefit from more dramatic variation.
151152
- id: DQ-02
152153
name: Realistic Context
153154
score: 5
154155
max: 5
155156
passed: true
156-
comment: SaaS monthly cohort retention. Neutral and realistic.
157+
comment: SaaS monthly cohort retentionrealistic neutral business context.
157158
- id: DQ-03
158159
name: Appropriate Scale
159160
score: 4
160161
max: 4
161162
passed: true
162-
comment: Realistic values for SaaS retention (100% to ~25% over 9 months).
163+
comment: Retention 100% to ~25%, cohort sizes 980-1520 — plausible for SaaS.
163164
code_quality:
164-
score: 8
165+
score: 9
165166
max: 10
166167
items:
167168
- id: CQ-01
168169
name: KISS Structure
169-
score: 1
170+
score: 2
170171
max: 3
171-
passed: false
172-
comment: Custom class subclassing pygal Graph. Necessary for pygal but deviates
173-
from flat structure.
172+
passed: true
173+
comment: Uses custom class extending Graph — necessary for pygal but not pure
174+
KISS.
174175
- id: CQ-02
175176
name: Reproducibility
176177
score: 2
@@ -182,19 +183,19 @@ review:
182183
score: 2
183184
max: 2
184185
passed: true
185-
comment: All imports used.
186+
comment: All imports used. sys.path manipulation necessary for filename collision.
186187
- id: CQ-04
187188
name: Code Elegance
188189
score: 2
189190
max: 2
190191
passed: true
191-
comment: Well-organized code, clean color interpolation, no fake UI.
192+
comment: Well-structured code, no fake UI.
192193
- id: CQ-05
193194
name: Output & API
194195
score: 1
195196
max: 1
196197
passed: true
197-
comment: Saves as plot.png and plot.svg.
198+
comment: Saves as plot.png and plot.svg correctly.
198199
library_mastery:
199200
score: 8
200201
max: 10
@@ -204,21 +205,21 @@ review:
204205
score: 4
205206
max: 5
206207
passed: true
207-
comment: Properly subclasses Graph with _plot()/_compute() overrides. Uses
208-
SVG node system and Style class.
208+
comment: Properly extends Graph with _plot() and _compute() overrides. Uses
209+
Style class.
209210
- id: LM-02
210211
name: Distinctive Features
211212
score: 4
212213
max: 5
213214
passed: true
214-
comment: Uses pygal-specific Graph subclass, self.svg.node(), _tooltip_data(),
215-
and Style system.
215+
comment: SVG node manipulation, _tooltip_data for tooltips, linearGradient
216+
for colorbar, pygal rendering pipeline.
216217
verdict: REJECTED
217218
impl_tags:
218219
dependencies: []
219220
techniques:
220-
- colorbar
221221
- annotations
222+
- colorbar
222223
- hover-tooltips
223224
- html-export
224225
patterns:

0 commit comments

Comments
 (0)