11library : seaborn
22specification_id : heatmap-basic
33created : ' 2025-12-23T00:46:00Z'
4- updated : ' 2026-02-15T21:25:00+00:00 '
4+ updated : ' 2026-02-15T21:30:48Z '
55generated_by : claude-opus-4-6
66workflow_run : 20447949053
77issue : 0
@@ -10,205 +10,220 @@ library_version: 0.13.2
1010preview_url : https://storage.googleapis.com/pyplots-images/plots/heatmap-basic/seaborn/plot.png
1111preview_thumb : https://storage.googleapis.com/pyplots-images/plots/heatmap-basic/seaborn/plot_thumb.png
1212preview_html : null
13- quality_score : null
13+ quality_score : 82
1414impl_tags :
1515 dependencies : []
1616 techniques :
17- - colorbar
18- - annotations
17+ - colorbar
18+ - annotations
1919 patterns :
20- - data-generation
21- - matrix-construction
22- dataprep : []
20+ - data-generation
21+ dataprep :
22+ - hierarchical-clustering
2323 styling :
24- - custom-colormap
25- - grid-styling
24+ - custom-colormap
25+ - edge-highlighting
2626review :
2727 strengths :
28- - Excellent use of diverging RdBu colormap centered at 50, making it easy to distinguish
29- above/below average performance
30- - Data patterns are intentionally crafted to demonstrate heatmap capabilities (Sales
31- strong first half, Engineering strong second half, Finance consistently stable,
32- HR mid-year dip)
33- - Cell annotations with appropriate font size (16pt) make exact values readable
34- without cluttering
35- - Square figure format (12×12) is perfect for this 7×12 matrix, allowing cells to
36- be nearly square
37- - White gridlines with linewidth=1 provide clear cell separation without being distracting
38- - Colorbar properly configured with shrink, label, and tick formatting
28+ - Excellent use of sns.clustermap for hierarchical row-clustering, showcasing a
29+ distinctive seaborn capability
30+ - Well-crafted synthetic data with intentional patterns that create a meaningful
31+ story (Sales strong early, Engineering strong late, Finance stable)
32+ - All font sizes explicitly set with good readability at target resolution
33+ - Realistic business context with sensible performance score range
3934 weaknesses :
40- - Could use sns.clustermap or add dendrograms to showcase seaborn clustering capabilities
41- as mentioned in spec notes
42- - Colorbar label is set twice (in cbar_kws and manually), which is redundant code
43- image_description : ' The heatmap displays a 7×12 matrix showing monthly performance
44- scores (0-100) across 7 departments (Sales, Marketing, Engineering, Support, Finance,
45- HR, Operations) over 12 months (Jan-Dec). The plot uses a diverging RdBu (Red-Blue)
46- colormap centered at 50, where blue indicates high performance (approaching 100)
47- and red indicates low performance (approaching 0). Each cell contains a white
48- numeric annotation showing the exact score. White grid lines separate the cells.
49- The colorbar on the right is labeled "Performance Score" with a 0-100 scale. The
50- title "heatmap-basic · seaborn · pyplots.ai" appears at the top. Axis labels "Month"
51- (x-axis) and "Department" (y-axis) are clearly visible. Notable patterns include:
52- Finance row is consistently blue (high scores 74-91), Sales shows strong first
53- half (80-95) then drops, Engineering has strong second half performance (75-95
54- in Aug-Nov), and HR has a mid-year dip (11 in April).'
35+ - Missing Y-axis label (Department) — the ylabel is set to empty string
36+ - Manual colorbar creation via ScalarMappable after disabling built-in cbar (cbar_pos=None)
37+ is unnecessarily verbose — could use the built-in colorbar support
38+ - Custom diverging palette via sns.diverging_palette(240, 10) is not a standard
39+ colorblind-safe colormap — consider using RdBu_r or coolwarm for better accessibility
40+ - ' Could push design further: no spine removal, no background color refinement,
41+ annotation font could be larger'
42+ image_description : ' The plot displays a clustered heatmap of monthly department
43+ performance scores (0-100) for seven departments (Sales, Finance, Engineering,
44+ Operations, Marketing, Support, HR) across twelve months (Jan-Dec). A diverging
45+ blue-to-red colormap is used, centered at 50 — blue indicates low scores, red
46+ indicates high scores. Each cell contains a white-text integer annotation of the
47+ performance value. A dendrogram on the left groups departments by similarity via
48+ hierarchical row-clustering (columns are not clustered). A vertical colorbar on
49+ the right is labeled "Performance Score" with a 0-100 range. White gridlines separate
50+ each cell. The title "heatmap-basic · seaborn · pyplots.ai" appears at the top
51+ center. The X-axis is labeled "Month" and department names appear on the right
52+ Y-axis. Clear patterns are visible: Sales strong first half fading later, Engineering
53+ strong second half, Finance consistently high (~80-90), HR with lower scores mid-year.'
5554 criteria_checklist :
5655 visual_quality :
57- score : 38
58- max : 40
56+ score : 24
57+ max : 30
5958 items :
6059 - id : VQ-01
6160 name : Text Legibility
62- score : 10
63- max : 10
61+ score : 8
62+ max : 8
6463 passed : true
65- comment : Title 24pt, labels 20pt, ticks 16pt, annotations 16pt - all perfectly
66- readable
64+ comment : ' All font sizes explicitly set: title 24pt, xlabel 20pt, ticks 16pt,
65+ annotations 14pt '
6766 - id : VQ-02
6867 name : No Overlap
69- score : 8
70- max : 8
68+ score : 6
69+ max : 6
7170 passed : true
7271 comment : No overlapping text anywhere
7372 - id : VQ-03
7473 name : Element Visibility
75- score : 8
76- max : 8
74+ score : 5
75+ max : 6
7776 passed : true
78- comment : Cell colors and annotations are perfectly visible
77+ comment : Annotations readable; could be slightly larger for cell size
7978 - id : VQ-04
8079 name : Color Accessibility
81- score : 5
82- max : 5
80+ score : 3
81+ max : 4
8382 passed : true
84- comment : RdBu diverging colormap is colorblind-safe
83+ comment : Custom diverging blue-red palette functional but not a standard colorblind-safe
84+ option
8585 - id : VQ-05
8686 name : Layout Balance
87- score : 5
88- max : 5
87+ score : 3
88+ max : 4
8989 passed : true
90- comment : Square format appropriate for heatmap, good proportions
90+ comment : Decent layout; dendrogram and colorbar well-placed but some wasted
91+ vertical space
9192 - id : VQ-06
92- name : Axis Labels
93- score : 1
94- max : 2
95- passed : true
96- comment : Descriptive labels "Month" and "Department" but no units (appropriate
97- for categorical data)
98- - id : VQ-07
99- name : Grid & Legend
93+ name : Axis Labels & Title
10094 score : 1
10195 max : 2
96+ passed : false
97+ comment : X-axis labeled Month but Y-axis label is empty string — missing Department
98+ label
99+ design_excellence :
100+ score : 12
101+ max : 20
102+ items :
103+ - id : DE-01
104+ name : Aesthetic Sophistication
105+ score : 6
106+ max : 8
102107 passed : true
103- comment : Colorbar well placed; white gridlines are effective but slightly
104- thick
108+ comment : Clustermap with custom diverging palette, white gridlines, and hierarchical
109+ clustering shows design thought above defaults
110+ - id : DE-02
111+ name : Visual Refinement
112+ score : 4
113+ max : 6
114+ passed : true
115+ comment : White cell gridlines, custom colorbar placement, controlled dendrogram
116+ ratio; some defaults remain
117+ - id : DE-03
118+ name : Data Storytelling
119+ score : 4
120+ max : 6
121+ passed : true
122+ comment : ' Injected patterns create a story: Sales strong early, Engineering
123+ strong late, Finance stable, HR dip mid-year'
105124 spec_compliance :
106- score : 25
107- max : 25
125+ score : 14
126+ max : 15
108127 items :
109128 - id : SC-01
110129 name : Plot Type
111- score : 8
112- max : 8
113- passed : true
114- comment : Correct heatmap visualization
115- - id : SC-02
116- name : Data Mapping
117130 score : 5
118131 max : 5
119132 passed : true
120- comment : Rows=departments, Columns=months, color=values correctly mapped
121- - id : SC-03
133+ comment : Correct heatmap type via seaborn clustermap
134+ - id : SC-02
122135 name : Required Features
123- score : 5
124- max : 5
136+ score : 4
137+ max : 4
125138 passed : true
126- comment : Diverging colormap ✓, value annotations ✓, colorbar
127- - id : SC-04
128- name : Data Range
139+ comment : Diverging colormap, cell annotations, colorbar legend, logical row
140+ ordering via clustering
141+ - id : SC-03
142+ name : Data Mapping
129143 score : 3
130144 max : 3
131145 passed : true
132- comment : Full 0-100 range shown with vmin/vmax
133- - id : SC-05
134- name : Legend Accuracy
135- score : 2
136- max : 2
137- passed : true
138- comment : Colorbar correctly labeled "Performance Score"
139- - id : SC-06
140- name : Title Format
146+ comment : Departments as rows, months as columns, performance scores as values
147+ - id : SC-04
148+ name : Title & Legend
141149 score : 2
142- max : 2
150+ max : 3
143151 passed : true
144- comment : Exact format "heatmap-basic · seaborn · pyplots.ai"
152+ comment : Title format correct; colorbar serves as legend; Y-axis label absent
145153 data_quality :
146- score : 20
147- max : 20
154+ score : 14
155+ max : 15
148156 items :
149157 - id : DQ-01
150158 name : Feature Coverage
151- score : 8
152- max : 8
159+ score : 5
160+ max : 6
153161 passed : true
154- comment : Shows high/low values, consistent patterns (Finance), seasonal trends
155- (Sales, Engineering), mid-period dips (HR)
162+ comment : Shows variation, patterns, clustering — but could include more extreme
163+ outliers
156164 - id : DQ-02
157165 name : Realistic Context
158- score : 7
159- max : 7
166+ score : 5
167+ max : 5
160168 passed : true
161- comment : Monthly department performance metrics is a real, comprehensible
162- business scenario
169+ comment : ' Genuine business scenario: department performance by month'
163170 - id : DQ-03
164171 name : Appropriate Scale
165- score : 5
166- max : 5
172+ score : 4
173+ max : 4
167174 passed : true
168- comment : Performance scores 0-100 with realistic distribution and patterns
175+ comment : Performance scores 5-95 are realistic
169176 code_quality :
170- score : 10
177+ score : 9
171178 max : 10
172179 items :
173180 - id : CQ-01
174181 name : KISS Structure
175182 score : 3
176183 max : 3
177184 passed : true
178- comment : Clean imports → data → plot → save structure, no functions/classes
185+ comment : Clean imports → data → plot → save flow
179186 - id : CQ-02
180187 name : Reproducibility
181- score : 3
182- max : 3
188+ score : 2
189+ max : 2
183190 passed : true
184- comment : Uses np.random.seed(42)
191+ comment : np.random.seed(42) set
185192 - id : CQ-03
186193 name : Clean Imports
187194 score : 2
188195 max : 2
189196 passed : true
190- comment : Only matplotlib.pyplot , numpy, seaborn - all used
197+ comment : Only matplotlib, numpy, seaborn imported
191198 - id : CQ-04
192- name : No Deprecated API
199+ name : Code Elegance
193200 score : 1
194- max : 1
201+ max : 2
195202 passed : true
196- comment : Modern seaborn API usage
203+ comment : Manual ScalarMappable colorbar after setting cbar_pos=None is slightly
204+ verbose
197205 - id : CQ-05
198- name : Output Correct
206+ name : Output & API
199207 score : 1
200208 max : 1
201209 passed : true
202- comment : Saves as plot.png
210+ comment : Saves as plot.png, no deprecated functions
203211 library_features :
204- score : 0
205- max : 5
212+ score : 9
213+ max : 10
206214 items :
207- - id : LF -01
208- name : Uses distinctive library features
209- score : 0
215+ - id : LM -01
216+ name : Idiomatic Usage
217+ score : 4
210218 max : 5
211- passed : false
212- comment : Uses sns.heatmap which is core seaborn, but doesn't leverage seaborn-specific
213- features like clustermap for hierarchical clustering
214- verdict : APPROVED
219+ passed : true
220+ comment : Good use of sns.clustermap and sns.diverging_palette; manual colorbar
221+ handling is less idiomatic
222+ - id : LM-02
223+ name : Distinctive Features
224+ score : 5
225+ max : 5
226+ passed : true
227+ comment : sns.clustermap with hierarchical clustering is a distinctive seaborn
228+ feature not easily replicated elsewhere
229+ verdict : REJECTED
0 commit comments