Skip to content

Commit 773605d

Browse files
chore(altair): update quality score 87 and review feedback for rose-basic
1 parent 971ad19 commit 773605d

2 files changed

Lines changed: 81 additions & 111 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
""" anyplot.ai
22
rose-basic: Basic Rose Chart
33
Library: altair 6.1.0 | Python 3.13.13
4-
Quality: 86/100 | Updated: 2026-04-30
4+
Quality: 87/100 | Updated: 2026-04-30
55
"""
66

77
import os

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

Lines changed: 80 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ library: altair
22
language: python
33
specification_id: rose-basic
44
created: '2025-12-23T19:45:47Z'
5-
updated: '2026-04-30T07:12:28Z'
5+
updated: '2026-04-30T07:33:39Z'
66
generated_by: claude-sonnet
77
workflow_run: 25151891021
88
issue: 1003
@@ -12,142 +12,116 @@ 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/altair/plot-dark.png
1313
preview_html_light: https://storage.googleapis.com/anyplot-images/plots/rose-basic/python/altair/plot-light.html
1414
preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/rose-basic/python/altair/plot-dark.html
15-
quality_score: 86
15+
quality_score: 87
1616
review:
1717
strengths:
18-
- Correct rose/Nightingale chart with 12 equal-angle wedge segments and radius proportional
19-
to value
20-
- Viridis continuous colormap applied to value:Q is appropriate and perceptually
21-
uniform, creating effective dual encoding (radius + color) for the rainfall data
22-
- Radial gridlines at 25/50/75/100 mm with unit labels ('75 mm', '100 mm') aid value
23-
estimation as required by spec
24-
- All font sizes explicitly set and appropriate for the 3600x3600 canvas (title
25-
32px, month labels 22px, value labels 20px, grid labels 18px)
26-
- 'Full theme-adaptive chrome: PAGE_BG, INK, INK_SOFT tokens used correctly; both
27-
light (#FAF8F1) and dark (#1A1A17) backgrounds render correctly'
28-
- Layer composition with alt.layer() combining gridlines + arcs + value labels +
29-
month labels demonstrates idiomatic Altair usage
30-
- Both PNG and HTML saved per Altair interactive library requirements
31-
- 'Title format correct: ''rose-basic · altair · anyplot.ai'''
32-
- Data is deterministic (hardcoded monthly rainfall array), no seed needed
33-
- KISS code structure with no functions or classes
18+
- Viridis colormap is semantically correct for continuous value-based color encoding,
19+
providing intuitive low-to-high visual hierarchy
20+
- Segment stroke using PAGE_BG creates clean visual separation that adapts correctly
21+
to both light and dark themes
22+
- Five-layer Altair composition is clean and idiomatic — gridlines, labels, data
23+
each isolated
24+
- 'Full theme-adaptive chrome: all INK/INK_SOFT/PAGE_BG tokens properly threaded
25+
throughout'
26+
- 'Output format correct: both PNG and HTML exported for both themes'
3427
weaknesses:
35-
- 'Design Excellence gap (13/20): viridis colormap is effective but the overall
36-
layout lacks visual polish — consider adding a subtle center dot, refining gridline
37-
labels with an elevated background box, or adding a concise subtitle with the
38-
scenario (''Monthly Rainfall, mm'')'
39-
- 'DE-03 Data Storytelling: the dual encoding (radius + viridis) is good but could
40-
be stronger — consider annotating the peak month (Nov: 92mm) and trough (Jul:
41-
22mm) with callout labels or brief annotation text to direct the viewer''s attention
42-
to the story'
43-
- 'DE-02 Visual Refinement: the circular gridlines use strokeOpacity=0.35 and strokeDash=[6,4]
44-
which is appropriate, but the overall chrome could be more refined — the plain
45-
title with no subtitle and the sparse grid label positioning at 3 o''clock feels
46-
unfinished'
47-
- 'LM-02 Distinctive Features: while layer-composition and mark_arc with theta2
48-
are Altair-specific, the implementation could leverage Altair''s selection or
49-
a more distinctive Vega-Lite feature (e.g., a center circle mark, a custom radial
50-
label layout technique) to differentiate it further from a generic polar chart'
51-
- 'VQ-02 minor label crowding: value labels for June (28), July (22), August (30)
52-
cluster near center due to small segment radii; the label placement formula `max(v
53-
* 1.35, 45)` places them all at similar radii which creates a tight cluster at
54-
bottom'
28+
- Rose chart is positioned in the upper half of the 1200x1200 canvas, leaving excessive
29+
empty space below; center of chart area should be better utilized
30+
- No data storytelling element (e.g. highlighting peak month, focal annotation)
31+
— the chart shows data but does not guide the viewer to the key insight
32+
- Value labels for low-rainfall months (Jun=28, Jul=22, Aug=30) are crowded near
33+
the center; minimum offset or different placement needed for very small segments
5534
image_description: |-
5635
Light render (plot-light.png):
57-
Background: Warm off-white (#FAF8F1) — correct, not pure white.
58-
Chrome: Title "rose-basic · altair · anyplot.ai" at top center in dark ink, clearly readable. Month labels (Jan–Dec) in bold dark text around the outer ring, readable. Value labels (22–92) near segment tips in bold dark text, readable. Grid labels "75 mm" and "100 mm" at 3 o'clock position in muted INK_SOFT, small but legible. Dashed circular gridlines at 25/50/75/100 mm in subtle gray.
59-
Data: 12 arc segments colored with viridis palette (purple/dark-blue for low values Jun=28, Jul=22; transitioning to teal, green, yellow-green, yellow for high values Nov=92, Dec=88, Oct=85). Segment radii visibly proportional to rainfall values. Winter months (Oct–Jan) dominate with taller, brighter segments.
60-
Legibility verdict: PASS — all text readable against light background; no light-on-light issues.
36+
Background: Warm off-white #FAF8F1 — correct theme surface
37+
Chrome: Title "rose-basic · altair · anyplot.ai" in dark #1A1A17 ink, bold and readable. Month labels (Jan–Dec) in dark INK around the outer edge. Value labels (22–92) in dark INK near segment tips. Grid labels "75 mm" and "100 mm" in INK_SOFT at 3 o'clock position — visible. "25 mm" and "50 mm" labels at very small radii are harder to distinguish but present.
38+
Data: 12 rose segments using viridis colormap — deep purple/indigo for low summer months (Jul=22mm minimum), transitioning through teal and green to bright yellow-green for peak autumn months (Nov=92mm maximum). Segment strokes in PAGE_BG create clean separation. Dashed radial gridlines at four intervals.
39+
Legibility verdict: PASS — all major text elements readable against light background
6140
6241
Dark render (plot-dark.png):
63-
Background: Near-black (#1A1A17) — correct, not pure black.
64-
Chrome: Title in light text at top, readable. Month labels in light bold text around outer ring, readable. Value labels in light bold text near segment tips, readable. Grid labels "75 mm" and "100 mm" in muted light-gray (INK_SOFT dark token), readable. Dashed circular gridlines visible against dark background.
65-
Data: Viridis segment colors appear identical to the light render — same purple-to-yellow gradient encoding rainfall values. No color shift between themes, data identity preserved.
66-
Legibility verdict: PASS — no dark-on-dark issues; all text uses light INK/INK_SOFT tokens appropriate for dark surface.
42+
Background: Near-black #1A1A17 — correct theme surface
43+
Chrome: Title text in light cream #F0EFE8, clearly readable. Month labels in light text. Value labels in light INK. Grid labels in INK_SOFT (#B8B7B0) — readable. No dark-on-dark failures detected.
44+
Data: Viridis colors are identical to light render — purple for low months, yellow-green for high months. Segment strokes use #1A1A17 (dark PAGE_BG) providing appropriate separation on dark surface.
45+
Legibility verdict: PASS — all text readable against dark background, no theme-adaptation failures
6746
criteria_checklist:
6847
visual_quality:
69-
score: 26
48+
score: 27
7049
max: 30
7150
items:
7251
- id: VQ-01
7352
name: Text Legibility
7453
score: 7
7554
max: 8
7655
passed: true
77-
comment: 'All font sizes explicitly set: title 32px, month labels 22px, value
78-
labels 20px, grid labels 18px. All readable at 3600x3600. Grid labels slightly
79-
small at 18px but within spec.'
56+
comment: 'Font sizes explicitly set (title=32, month=22, values=20, grid=18).
57+
All text readable in both themes. Minor: 25mm grid label at very small radius
58+
barely distinguishable.'
8059
- id: VQ-02
8160
name: No Overlap
8261
score: 5
8362
max: 6
8463
passed: true
85-
comment: Mostly no overlap; slight crowding of value labels for small segments
86-
(Jun=28, Jul=22, Aug=30) which cluster at similar radii near center.
64+
comment: Value labels for small summer segments (Jun=28, Jul=22, Aug=30) are
65+
clustered near center; slight crowding but no hard collision.
8766
- id: VQ-03
8867
name: Element Visibility
89-
score: 5
68+
score: 6
9069
max: 6
9170
passed: true
92-
comment: Segments clearly visible with viridis coloring. Small segments (Jun/Jul/Aug)
93-
are genuinely small due to low values, which is correct for a rose chart.
71+
comment: All 12 segments clearly visible with distinct stroke separation.
72+
Dashed radial gridlines readable at all rings.
9473
- id: VQ-04
9574
name: Color Accessibility
9675
score: 2
9776
max: 2
9877
passed: true
99-
comment: Viridis is perceptually uniform and CVD-safe. Good luminance progression.
78+
comment: Viridis is perceptually uniform and CVD-safe. No red-green sole signal.
10079
- id: VQ-05
10180
name: Layout & Canvas
10281
score: 3
10382
max: 4
10483
passed: true
105-
comment: 'Chart fills ~60-70% of 3600x3600 canvas. Circular layout with gridlines
106-
is well-proportioned. Minor: data-heavy upper quadrant leaves lower portion
107-
visually sparse.'
84+
comment: 3600x3600px correct square format. Rose positioned correctly but
85+
sits in upper half leaving disproportionate empty space below.
10886
- id: VQ-06
10987
name: Axis Labels & Title
11088
score: 2
11189
max: 2
11290
passed: true
113-
comment: Grid labels include units ('75 mm', '100 mm'). Month labels descriptive.
114-
Title correct.
91+
comment: Title format correct. Grid labels provide scale context in mm units.
11592
- id: VQ-07
11693
name: Palette Compliance
11794
score: 2
11895
max: 2
11996
passed: true
120-
comment: 'Viridis applied to continuous value:Q is correct per style guide.
121-
Backgrounds are #FAF8F1 (light) and #1A1A17 (dark). All chrome uses theme-adaptive
122-
tokens. Both renders correct.'
97+
comment: 'Viridis correctly applied to continuous value-based color encoding.
98+
Backgrounds #FAF8F1 (light) and #1A1A17 (dark) correct.'
12399
design_excellence:
124-
score: 13
100+
score: 11
125101
max: 20
126102
items:
127103
- id: DE-01
128104
name: Aesthetic Sophistication
129105
score: 5
130106
max: 8
131107
passed: true
132-
comment: 'Above default: viridis dual-encoding (radius + color) is a thoughtful
133-
design choice. White segment strokes add definition. Overall feels professional
134-
but not exceptional.'
108+
comment: Viridis creates meaningful visual hierarchy from low to peak months.
109+
Segment stroke with PAGE_BG creates clean separation. Professional but conventional
110+
composition.
135111
- id: DE-02
136112
name: Visual Refinement
137-
score: 4
113+
score: 3
138114
max: 6
139115
passed: true
140-
comment: 'Good refinement: dashed radial gridlines with low opacity, no axis
141-
chrome, configure_view strokeWidth=0. Could refine grid label positioning
142-
and add a subtitle.'
116+
comment: Dashed radial gridlines deliberate and appropriate. Axes/ticks suppressed
117+
correctly for circular chart. Moderate refinement beyond defaults.
143118
- id: DE-03
144119
name: Data Storytelling
145-
score: 4
120+
score: 3
146121
max: 6
147122
passed: true
148-
comment: Dual encoding (radius + viridis color) makes winter peak immediately
149-
visible. Value labels enable precise reading. Missing explicit annotation
150-
of peak/trough to direct viewer attention.
123+
comment: Cyclical seasonal pattern visible through radius + viridis. No explicit
124+
focal-point emphasis or annotations to guide viewer beyond raw data.
151125
spec_compliance:
152126
score: 15
153127
max: 15
@@ -157,29 +131,28 @@ review:
157131
score: 5
158132
max: 5
159133
passed: true
160-
comment: Correct rose/Nightingale chart with equal-angle wedge segments and
161-
radius proportional to value.
134+
comment: Correct Nightingale/rose chart with radius proportional to value.
162135
- id: SC-02
163136
name: Required Features
164137
score: 4
165138
max: 4
166139
passed: true
167-
comment: 'All spec features present: circular arrangement, radius proportional
168-
to value, radial gridlines, 12-month cyclical data, starts at top (12 o''clock).'
140+
comment: Radial gridlines at 25/50/75/100mm, radius proportional to value,
141+
12-month circular ordering, Jan at 12 o'clock.
169142
- id: SC-03
170143
name: Data Mapping
171144
score: 3
172145
max: 3
173146
passed: true
174-
comment: Categories at angular positions, values determine radius. All 12
175-
months represented.
147+
comment: Monthly rainfall correctly encoded as segment radius. All 12 data
148+
points shown.
176149
- id: SC-04
177150
name: Title & Legend
178151
score: 3
179152
max: 3
180153
passed: true
181-
comment: Title 'rose-basic · altair · anyplot.ai' correct. No legend (appropriate
182-
— value labels shown directly on segments, continuous color has no legend).
154+
comment: Title matches required format. No categorical legend needed for continuous
155+
viridis encoding.
183156
data_quality:
184157
score: 15
185158
max: 15
@@ -189,23 +162,22 @@ review:
189162
score: 6
190163
max: 6
191164
passed: true
192-
comment: Full range from 22 to 92 mm shows meaningful variation. Both high-value
193-
(winter) and low-value (summer) months clearly represented. Cyclical pattern
194-
visible.
165+
comment: 'All rose chart aspects demonstrated: radius encoding, angular categories,
166+
radial gridlines, month labels, value labels.'
195167
- id: DQ-02
196168
name: Realistic Context
197169
score: 5
198170
max: 5
199171
passed: true
200-
comment: Monthly rainfall is a classic rose chart use case (Florence Nightingale's
201-
original application). Neutral, real-world scenario.
172+
comment: Monthly rainfall in mm is plausible, neutral, domain-appropriate.
173+
Values show realistic seasonal pattern.
202174
- id: DQ-03
203175
name: Appropriate Scale
204176
score: 4
205177
max: 4
206178
passed: true
207-
comment: Monthly rainfall values 22-92mm are factually plausible for a Mediterranean/temperate
208-
climate with winter-dominant rainfall.
179+
comment: 22-92mm monthly rainfall realistic for temperate climate. 12 months
180+
is optimal category count per spec.
209181
code_quality:
210182
score: 10
211183
max: 10
@@ -215,61 +187,59 @@ review:
215187
score: 3
216188
max: 3
217189
passed: true
218-
comment: 'Clean linear structure: theme setup -> data -> chart layers -> combine
219-
-> save. No functions or classes.'
190+
comment: Flat top-level code, no functions or classes.
220191
- id: CQ-02
221192
name: Reproducibility
222193
score: 2
223194
max: 2
224195
passed: true
225-
comment: Deterministic hardcoded data. No random seed needed.
196+
comment: Fully deterministic; hardcoded data with no randomness.
226197
- id: CQ-03
227198
name: Clean Imports
228199
score: 2
229200
max: 2
230201
passed: true
231-
comment: Only os, altair, numpy, pandas — all used.
202+
comment: os, altair, numpy, pandas — all actively used.
232203
- id: CQ-04
233204
name: Code Elegance
234205
score: 2
235206
max: 2
236207
passed: true
237-
comment: Appropriately complex for a layered polar chart. Separate DataFrames
238-
for each layer type is necessary for Altair's architecture.
208+
comment: Clean Altair layer composition. Radius domain/range explicitly controlled.
209+
No fake UI.
239210
- id: CQ-05
240211
name: Output & API
241212
score: 1
242213
max: 1
243214
passed: true
244-
comment: Saves plot-{THEME}.png and plot-{THEME}.html. Correct for Altair
245-
(interactive library).
215+
comment: Saves plot-{THEME}.png and plot-{THEME}.html with scale_factor=3.0.
246216
library_mastery:
247-
score: 7
217+
score: 9
248218
max: 10
249219
items:
250220
- id: LM-01
251221
name: Idiomatic Usage
252-
score: 4
222+
score: 5
253223
max: 5
254224
passed: true
255-
comment: 'Good idiomatic use: mark_arc with theta/theta2/radius, alt.layer()
256-
composition, configure_view/configure_axis, scale with domain/range. Solid
257-
Altair patterns.'
225+
comment: Correct use of alt.Theta/Theta2/Radius encoding for arc marks. alt.layer()
226+
composition. Explicit alt.Scale for polar radius control.
258227
- id: LM-02
259228
name: Distinctive Features
260-
score: 3
229+
score: 4
261230
max: 5
262231
passed: true
263-
comment: Layer composition with multiple mark types is Altair-distinctive.
264-
Theta2 for arc spans, radius scale with explicit domain/range for polar
265-
layout. Could go further with more uniquely Altair features.
266-
verdict: REJECTED
232+
comment: mark_arc with theta/theta2/radius (Altair polar encoding), 5-layer
233+
composition, interactive hover tooltips, HTML export. Could push further
234+
with dynamic elements.
235+
verdict: APPROVED
267236
impl_tags:
268237
dependencies: []
269238
techniques:
270-
- layer-composition
271239
- hover-tooltips
272240
- html-export
241+
- layer-composition
242+
- polar-projection
273243
patterns: []
274244
dataprep: []
275245
styling:

0 commit comments

Comments
 (0)