Skip to content

Commit aaae503

Browse files
chore(matplotlib): update quality score 90 and review feedback for rose-basic
1 parent ab49e4c commit aaae503

2 files changed

Lines changed: 117 additions & 95 deletions

File tree

plots/rose-basic/implementations/python/matplotlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"""anyplot.ai
1+
""" anyplot.ai
22
rose-basic: Basic Rose Chart
33
Library: matplotlib 3.11.1 | Python 3.13.14
4-
Quality: 82/100 | Updated: 2026-07-25
4+
Quality: 90/100 | Updated: 2026-07-25
55
"""
66

77
import os

plots/rose-basic/metadata/python/matplotlib.yaml

Lines changed: 115 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ library: matplotlib
22
language: python
33
specification_id: rose-basic
44
created: '2025-12-23T19:42:44Z'
5-
updated: '2026-07-25T10:16:09Z'
5+
updated: '2026-07-25T10:28:53Z'
66
generated_by: claude-sonnet
77
workflow_run: 30153860732
88
issue: 1003
@@ -12,159 +12,178 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/rose-basi
1212
preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/rose-basic/python/matplotlib/plot-dark.png
1313
preview_html_light: null
1414
preview_html_dark: null
15-
quality_score: 82
15+
quality_score: 90
1616
review:
1717
strengths:
18-
- Theme-adaptive chrome is correctly threaded through every element (title, month/tick
19-
labels, spines, grid) — both light and dark renders are fully legible with an
20-
identical Imprint brand-green data color.
21-
- Correct square canvas choice (2400×2400) for a circular/symmetric chart type,
22-
with a length-aware title fontsize formula that avoids overflow.
23-
- Radius (not area) is directly proportional to value via ax.bar(bottom=0), matching
24-
the spec's core requirement; small angular gaps between wedges give clean separation
25-
without needing edge strokes.
26-
- Realistic, neutral monthly rainfall data with a clear monsoon-like seasonal cycle
27-
(72mm to 180mm) that fully demonstrates the plot type.
28-
- Idiomatic polar-bar API usage — set_theta_zero_location('N') and set_theta_direction(-1)
29-
correctly orient the chart to spec (12 o'clock start, clockwise).
18+
- Per-wedge alpha scaled by value (0.55–0.95) creates an intuitive “single color
19+
with varying saturation” effect exactly as the spec calls for, drawing the eye
20+
to the wettest months without leaving brand green
21+
- 'Peak-month callout (“Peak: Jul 180mm”) is placed cleanly outside the data ring
22+
but inside the plot''s outer spine, with generous headroom (ylim × 1.32) so it
23+
never collides with a wedge or clips the canvas — genuine data storytelling with
24+
a clear focal point'
25+
- Radial tick labels correctly relocated to the 15° gap (avoiding the default 0°
26+
collision with the Jan wedge) and title fontsize dynamically scaled to the extended
27+
(descriptive-title + language) string length, avoiding overflow on the square
28+
canvas
29+
- 'Correct polar-chart mechanics: 12 o''clock start (theta_zero_location=''N''),
30+
clockwise direction, equal angular width per month, radius (not area) proportional
31+
to value — matches every spec requirement'
32+
- Theme-adaptive chrome fully correct on both renders — text, grid, spine, and annotation
33+
colors flip appropriately between light/dark; brand green data color stays pixel-identical
34+
across themes
3035
weaknesses:
31-
- 'Title is missing the required ''python'' language token: code sets title = "Monthly
32-
Rainfall (mm) · rose-basic · matplotlib · anyplot.ai" but the mandated format
33-
is `{spec-id} · {language} · {library} · anyplot.ai` (optionally prefixed by a
34-
descriptive title). Fix: change the string to "Monthly Rainfall (mm) · rose-basic
35-
· python · matplotlib · anyplot.ai".'
36-
- Radial tick labels '25' and '50' sit directly on top of the green Jan wedge in
37-
both renders, reducing their contrast versus the other tick labels that sit on
38-
the plain background — nudge the tick label radius/angle (or increase ax.set_ylim
39-
padding) so they clear the data area.
40-
- 'Design Excellence is default-level: a single flat brand-green fill with no saturation/value
41-
variation and no callouts leaves the chart visually correct but generic — consider
42-
highlighting the peak month (Jul) or a subtle radial gradient for stronger visual
43-
hierarchy.'
44-
- Library Mastery only partially leveraged — beyond the standard polar-bar recipe
45-
(theta_zero_location, theta_direction), no matplotlib-distinctive touch (custom
46-
Wedge patches, per-wedge alpha variation, annotate() peak callout) is used.
36+
- 'PIPELINE ISSUE: the plot_images/plot-light.png and plot-dark.png supplied for
37+
this review are stale — they predate the latest commit ab49e4c9a ("fix(matplotlib):
38+
address review feedback for rose-basic") and are missing “python” from the title,
39+
the peak-month annotation, and the per-wedge alpha gradient that are present in
40+
the current matplotlib.py. Scoring against those images would have graded a superseded
41+
artifact (and wrongly flagged SC-04 for a missing language token). This review
42+
was conducted against renders regenerated locally from the current implementation
43+
file so the score reflects the code that will actually merge; the render/promotion
44+
step should be checked to make sure the images it ships always match the final
45+
commit.'
46+
- Radial tick label ‘50’ (rlabel_position=15°) sits just inside the Feb wedge's
47+
angular start and overlaps its fill instead of landing cleanly in the inter-wedge
48+
gap — nudge rlabel_position a degree or two further from 15°, or reduce it, so
49+
all radial labels clear the wedge fills the way 100/150/200 already do.
50+
- Grid uses linestyle="--" (dashed); the style guide's Grid Guidelines call for
51+
solid thin lines at 15–25% opacity — switch to linestyle="-" for closer compliance.
52+
- 'LM-02: the per-wedge alpha loop and annotate() callout are nice touches but not
53+
features unique to matplotlib — could push further with a matplotlib-specific
54+
technique (e.g. a colormap-driven radial gradient or PolyCollection) to earn a
55+
higher distinctiveness score next time.'
4756
image_description: |-
48-
Light render (plot-light.png):
49-
Background: Warm off-white (#FAF8F1), not pure white — correct.
50-
Chrome: Bold dark title "Monthly Rainfall (mm) · rose-basic · matplotlib · anyplot.ai" at top, clearly readable. Twelve bold dark-gray month labels (Jan-Dec) ring the circumference, correctly starting at Jan (12 o'clock) and running clockwise. Radial gridline labels (25-200) in muted gray are readable against the cream background; the "25" and "50" labels specifically fall inside the green Jan wedge, which softens their contrast slightly but they remain legible.
51-
Data: Twelve green (#009E73) wedges with radius proportional to monthly rainfall value, thin cream gaps between each wedge for separation, subtle dashed radial gridlines. Clear seasonal peak around Jun-Aug, dip around Feb.
52-
Legibility verdict: PASS (all text readable; minor contrast softening where "25"/"50" tick labels cross the data wedge, not a failure).
57+
NOTE: The pipeline-supplied plot_images/plot-light.png and plot-dark.png were stale (pre-date commit ab49e4c9a and are missing "python" in the title, the peak annotation, and the alpha gradient). The descriptions below are from renders regenerated locally from the current plots/rose-basic/implementations/python/matplotlib.py, i.e. what the merged code actually produces.
5358
54-
Dark render (plot-dark.png):
55-
Background: Warm near-black (#1A1A17), not pure black — correct.
56-
Chrome: Title and month labels render in light tones (white/light-gray), fully readable against the dark background. Gaps between wedges appear as near-black slivers matching the page background (expected, not a defect) rather than the grid lines. Radial gridline labels are light gray and readable; "25"/"50" again cross the data wedge with a similar minor contrast softening as in the light render.
57-
Data: Identical brand-green (#009E73) wedges, same shapes/values as the light render — confirmed data colors unchanged across themes.
58-
Legibility verdict: PASS (no dark-on-dark failures; all title/label/tick text is clearly visible on the dark surface).
59+
Light render (plot-light.png, regenerated from current code):
60+
Background: warm off-white, matches #FAF8F1, not pure white.
61+
Chrome: Bold dark title "Monthly Rainfall (mm) · rose-basic · python · matplotlib · anyplot.ai" at top, clearly readable, dynamically shrunk to fit the square canvas without overflow. Month labels (Jan-Dec) bold dark text around the circumference, radial value ticks (25/50/75.../200) in muted gray positioned in the 15° gap between Jan and Feb. Bold dark "Peak: Jul 180mm" annotation with a thin connector line sits just inside the outer spine below the Jul wedge.
62+
Data: 12 equal-angle wedges in Imprint brand green #009E73, radius proportional to monthly rainfall (72mm Feb to 180mm Jul), with per-wedge alpha (0.55-0.95) scaling by value so wetter months read visually "deeper" green — a legitimate single-hue saturation effect, not a second color.
63+
Legibility verdict: PASS — all text readable; one minor issue: the "50" radial tick label overlaps the Feb wedge fill (still legible, gray text with unbroken cream-side too, but not fully in the clear gap like the other tick labels).
64+
65+
Dark render (plot-dark.png, regenerated from current code):
66+
Background: warm near-black, matches #1A1A17, not pure black.
67+
Chrome: Same title/month-label/tick-label/annotation layout as light, all rendered in light-colored ink (title/annotation in near-white INK, tick labels in muted light gray INK_MUTED) — fully readable against the dark surface, no dark-on-dark failures anywhere.
68+
Data: Identical brand-green wedges and identical per-wedge alpha gradient as the light render — confirms data colors are theme-independent, only chrome flipped.
69+
Legibility verdict: PASS — same minor "50" tick label / Feb wedge overlap as light render, otherwise clean.
5970
criteria_checklist:
6071
visual_quality:
61-
score: 27
72+
score: 28
6273
max: 30
6374
items:
6475
- id: VQ-01
6576
name: Text Legibility
6677
score: 7
6778
max: 8
6879
passed: true
69-
comment: Explicit font sizes throughout (length-scaled title, 9pt bold month
70-
labels, 8pt radial ticks); fully readable in both themes.
80+
comment: All font sizes explicitly set (title dynamically scaled, 9pt month
81+
labels, 8pt ticks/annotation); readable in both themes; title fits without
82+
overflow despite the extended descriptive+language string
7183
- id: VQ-02
7284
name: No Overlap
73-
score: 4
85+
score: 5
7486
max: 6
7587
passed: true
76-
comment: Radial tick labels '25' and '50' overlap the green Jan wedge in both
77-
renders, softening their contrast versus the other tick labels.
88+
comment: 'Minor: the ''50'' radial tick label overlaps the Feb wedge fill
89+
instead of sitting cleanly in the inter-wedge gap; everything else (title,
90+
month labels, peak annotation) is clear'
7891
- id: VQ-03
7992
name: Element Visibility
8093
score: 6
8194
max: 6
8295
passed: true
83-
comment: Twelve equal-angle wedges with clear angular gaps are optimally visible;
84-
no overplotting for this category count.
96+
comment: 12 sparse categories with wide, prominent wedges and a clear alpha
97+
gradient for emphasis — well adapted to the data density
8598
- id: VQ-04
8699
name: Color Accessibility
87100
score: 2
88101
max: 2
89102
passed: true
90-
comment: Single CVD-safe brand green used; no red-green reliance.
103+
comment: Single-hue encoding with radius as the primary (accessible) value
104+
signal; alpha is a redundant, non-essential emphasis layer, not the sole
105+
distinguishing feature
91106
- id: VQ-05
92107
name: Layout & Canvas
93108
score: 4
94109
max: 4
95110
passed: true
96-
comment: Circular chart is well-balanced within the square canvas, no cutoff,
97-
generous margins.
111+
comment: Circular chart fills a good, balanced portion of the square canvas
112+
with generous, even margins; peak annotation sits cleanly in the outer margin
113+
without crowding
98114
- id: VQ-06
99115
name: Axis Labels & Title
100116
score: 2
101117
max: 2
102118
passed: true
103-
comment: Title includes units (mm); radial values are self-explanatory as
104-
rainfall amounts.
119+
comment: Title states units ('Monthly Rainfall (mm)'); radial ticks are numeric
120+
magnitude values consistent with rose-chart convention
105121
- id: VQ-07
106122
name: Palette Compliance
107123
score: 2
108124
max: 2
109125
passed: true
110-
comment: 'First series is #009E73 in both renders; backgrounds are #FAF8F1/#1A1A17;
111-
all chrome is theme-correct.'
126+
comment: 'First (only) series is #009E73 in both renders; backgrounds and
127+
all chrome are theme-correct (#FAF8F1 light / #1A1A17 dark)'
112128
design_excellence:
113-
score: 10
129+
score: 15
114130
max: 20
115131
items:
116132
- id: DE-01
117133
name: Aesthetic Sophistication
118-
score: 4
134+
score: 6
119135
max: 8
120-
passed: false
121-
comment: 'Well-configured default: single flat brand color, no gradient or
122-
per-category variation.'
136+
passed: true
137+
comment: Value-scaled alpha and deliberate tick repositioning show intentional
138+
hierarchy clearly above library defaults, though palette stays single-hue
123139
- id: DE-02
124140
name: Visual Refinement
125141
score: 4
126142
max: 6
127143
passed: true
128-
comment: Grid is subtle, spines colored/thinned, wedge gaps aid separation
129-
— some refinement beyond bare defaults.
144+
comment: Subtle grid (alpha 0.2), thoughtfully placed radial ticks, generous
145+
whitespace; docked a point for dashed grid (style guide prefers solid) and
146+
the tick/wedge overlap
130147
- id: DE-03
131148
name: Data Storytelling
132-
score: 2
149+
score: 5
133150
max: 6
134-
passed: false
135-
comment: Data is displayed with no explicit emphasis or annotation on the
136-
seasonal peak; viewer must find the story unaided.
151+
passed: true
152+
comment: 'Alpha gradient plus an explicit ''Peak: Jul 180mm'' callout give
153+
the chart a clear, immediate focal point — the viewer doesn''t have to find
154+
the story themselves'
137155
spec_compliance:
138-
score: 13
156+
score: 15
139157
max: 15
140158
items:
141159
- id: SC-01
142160
name: Plot Type
143161
score: 5
144162
max: 5
145163
passed: true
146-
comment: Correct rose/coxcomb chart implemented via polar bar plot.
164+
comment: Correct rose/coxcomb chart with equal-angle wedges and radius proportional
165+
to value
147166
- id: SC-02
148167
name: Required Features
149168
score: 4
150169
max: 4
151170
passed: true
152-
comment: Radius proportional to value, natural circular month ordering, 12
153-
o'clock start, radial gridlines all present.
171+
comment: 12 o'clock start, clockwise direction, radial gridlines, single-color-with-varying-saturation
172+
scheme all present per spec
154173
- id: SC-03
155174
name: Data Mapping
156175
score: 3
157176
max: 3
158177
passed: true
159-
comment: Angle=month, radius=value correctly mapped; full year visible.
178+
comment: Months correctly mapped to angle, rainfall correctly mapped to radius
160179
- id: SC-04
161180
name: Title & Legend
162-
score: 1
181+
score: 3
163182
max: 3
164-
passed: false
165-
comment: Title omits the required 'python' language token (reads '... rose-basic
166-
· matplotlib · anyplot.ai' instead of '... rose-basic · python · matplotlib
167-
· anyplot.ai'); legend appropriately omitted for single series.
183+
passed: true
184+
comment: Title is 'Monthly Rainfall (mm) · rose-basic · python · matplotlib
185+
· anyplot.ai' — correct format; legend correctly omitted for single-series
186+
chart
168187
data_quality:
169188
score: 15
170189
max: 15
@@ -174,21 +193,22 @@ review:
174193
score: 6
175194
max: 6
176195
passed: true
177-
comment: Full seasonal cycle (72mm to 180mm) clearly demonstrates the radius-encodes-value
178-
mechanic.
196+
comment: Full annual cycle shown with realistic seasonal variation (72mm-180mm),
197+
clear low/high months
179198
- id: DQ-02
180199
name: Realistic Context
181200
score: 5
182201
max: 5
183202
passed: true
184-
comment: Realistic, neutral monthly rainfall / monsoon-pattern scenario.
203+
comment: Neutral, comprehensible real-world scenario (monthly rainfall / climate
204+
data)
185205
- id: DQ-03
186206
name: Appropriate Scale
187207
score: 4
188208
max: 4
189209
passed: true
190-
comment: Values and seasonal proportions are physically plausible for a monsoon-influenced
191-
climate.
210+
comment: Values and the summer-peak seasonal shape are physically plausible
211+
for a wet-summer climate
192212
code_quality:
193213
score: 10
194214
max: 10
@@ -198,31 +218,33 @@ review:
198218
score: 3
199219
max: 3
200220
passed: true
201-
comment: Linear imports → data → plot → save, no functions/classes.
221+
comment: Linear imports → data → plot → save, no functions/classes
202222
- id: CQ-02
203223
name: Reproducibility
204224
score: 2
205225
max: 2
206226
passed: true
207-
comment: Fully deterministic hardcoded data, no randomness to seed.
227+
comment: Fully deterministic hardcoded data, no randomness
208228
- id: CQ-03
209229
name: Clean Imports
210230
score: 2
211231
max: 2
212232
passed: true
213-
comment: Only numpy, matplotlib.pyplot, os — all used.
233+
comment: Only matplotlib.pyplot, numpy, os — all used
214234
- id: CQ-04
215235
name: Code Elegance
216236
score: 2
217237
max: 2
218238
passed: true
219-
comment: Clean, appropriately simple, no fake functionality.
239+
comment: Clean, appropriately complex, well-commented on non-obvious choices
240+
(fontsize formula, rlabel gap, headroom math), no fake functionality
220241
- id: CQ-05
221242
name: Output & API
222243
score: 1
223244
max: 1
224245
passed: true
225-
comment: Saves plot-{THEME}.png with default bbox_inches (no bbox_inches='tight').
246+
comment: Saves as plot-{THEME}.png via current savefig API, no deprecated
247+
calls
226248
library_mastery:
227249
score: 7
228250
max: 10
@@ -232,23 +254,23 @@ review:
232254
score: 4
233255
max: 5
234256
passed: true
235-
comment: Idiomatic polar-bar recipe with correct theta_zero_location/theta_direction
236-
orientation.
257+
comment: Proper polar-projection subplot_kw, theta_zero_location/theta_direction,
258+
set_rlabel_position — idiomatic polar API usage
237259
- id: LM-02
238260
name: Distinctive Features
239261
score: 3
240262
max: 5
241-
passed: false
242-
comment: Uses polar-projection distinctly but no further matplotlib-unique
243-
flourish beyond the standard recipe.
244-
verdict: REJECTED
263+
passed: true
264+
comment: Per-bar alpha mutation loop and annotate()-with-arrow callout are
265+
matplotlib-specific touches, but not features unreplicable in other libraries
266+
verdict: APPROVED
245267
impl_tags:
246268
dependencies: []
247269
techniques:
248270
- polar-projection
249271
- manual-ticks
272+
- annotations
250273
patterns:
251-
- data-generation
252274
- explicit-figure
253275
dataprep: []
254276
styling:

0 commit comments

Comments
 (0)