Skip to content

Commit 4da745d

Browse files
chore(altair): update quality score 86 and review feedback for line-basic
1 parent 02e1d4c commit 4da745d

2 files changed

Lines changed: 65 additions & 74 deletions

File tree

plots/line-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
line-basic: Basic Line Plot
33
Library: altair 6.1.0 | Python 3.13.13
4-
Quality: 85/100 | Updated: 2026-04-29
4+
Quality: 86/100 | Updated: 2026-04-29
55
"""
66

77
import os

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

Lines changed: 64 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ library: altair
22
language: python
33
specification_id: line-basic
44
created: '2025-12-23T00:24:33Z'
5-
updated: '2026-04-29T15:32:08Z'
5+
updated: '2026-04-29T15:42:27Z'
66
generated_by: claude-sonnet
77
workflow_run: 25117106624
88
issue: 653
@@ -12,43 +12,37 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/line-basi
1212
preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/line-basic/python/altair/plot-dark.png
1313
preview_html_light: https://storage.googleapis.com/anyplot-images/plots/line-basic/python/altair/plot-light.html
1414
preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/line-basic/python/altair/plot-dark.html
15-
quality_score: 85
15+
quality_score: 86
1616
review:
1717
strengths:
18-
- 'Correct Okabe-Ito brand color (#009E73) for data line and markers; proper theme
19-
tokens with correct #FAF8F1/#1A1A17 backgrounds in both renders'
20-
- All text sizes explicitly set to style-guide values (title 28px, axis 22px, ticks
21-
18px); both light and dark renders fully readable with no legibility failures
22-
- 'Clean idiomatic Altair code: layer composition (line + points via + operator),
23-
alt.Tooltip with custom formatting, configure_* chain — all correct Altair patterns'
24-
- 'Perfect spec compliance and data quality: realistic monthly temperature data
25-
showing clear seasonal cycle; correct title format line-basic · altair · anyplot.ai'
26-
- 'Perfect code quality: KISS structure, np.random.seed(42), clean imports, both
27-
.png and .html saved correctly'
18+
- Brand green (#009E73) used correctly as single series color throughout both themes
19+
- All font sizes explicitly set (28/22/18px) — fully readable at 4800x2700px
20+
- Idiomatic Altair layer composition (line + points) with proper encoding classes
21+
- Perfect spec, data, and code quality scores — clean, reproducible, correct
22+
- Tooltips with formatted month/temperature values and HTML export alongside PNG
2823
weaknesses:
29-
- Full grid on both X and Y axes — style guide recommends Y-axis only for line charts;
30-
fix with configure_axisX(grid=False)
31-
- All four spines visible — remove top and right spines for cleaner look; use configure_view
32-
or configure_axis settings
33-
- X-axis temporal tick labels show specific dates (Jan 07, Feb 04) instead of clean
34-
month names; add format argument to X axis encoding
35-
- No visual storytelling — seasonal peak in June is the natural focal point but
36-
nothing highlights it; consider area fill under the line or peak annotation to
37-
create emphasis
38-
- Last data point (December) partially clipped at right edge of temporal axis —
39-
set explicit domain to pad the axis
24+
- Full 2-axis grid (both X and Y gridlines) — style guide prefers Y-axis-only for
25+
line charts
26+
- 4-sided border frame from configure_view(stroke=INK_SOFT) — top/right borders
27+
should be removed
28+
- December data point squeezed at right edge with no December axis label visible;
29+
Altair temporal auto-ticks show weekly dates (Jan 07, Feb 04…) rather than month
30+
names, misaligning with the monthly dataset
31+
- No design storytelling — seasonal peak in June (~30°C) is the obvious focal point
32+
but receives no visual emphasis (no annotation, no highlighted marker, no gradient
33+
progression)
4034
image_description: |-
4135
Light render (plot-light.png):
42-
Background: Warm off-white (#FAF8F1) - matches required light surface
43-
Chrome: Title "line-basic · altair · anyplot.ai" in dark bold text - readable. Y-axis label "Temperature (°C)" and X-axis label "Month" both visible with correct dark text. Tick labels in secondary dark ink (#4A4A44), readable. X-axis ticks show specific date format ("Jan 07", "Feb 04") rather than clean month names - minor readability concern for monthly data.
44-
Data: Single teal (#009E73) line with strokeWidth=4, filled circle markers at each of 12 monthly data points. Clear seasonal bell-curve arc from ~4C in January to ~30C in June/July, then back down. Both horizontal and vertical grid lines visible (full grid, not Y-only).
45-
Legibility verdict: PASS - all text readable, no light-on-light issues. Minor concern: last December data point right at right edge of plot.
36+
Background: Warm off-white (#FAF8F1) — correct, not pure white
37+
Chrome: Title "line-basic · altair · anyplot.ai" in bold dark text, clearly readable. X-axis label "Month" and Y-axis label "Temperature (°C)" both visible in dark ink. Tick labels in muted dark (#4A4A44) at 18px — readable. Full grid (both X and Y) with 0.15 opacity — subtle but present on both axes. 4-sided border frame visible around plot area.
38+
Data: Single line in brand green (#009E73), strokeWidth=4, with filled circular markers (size=200) at each monthly data point. Sinusoidal annual temperature curve peaking ~30°C in June–July and troughing ~3–4°C in Dec–Jan. Axis ticks show weekly dates (Jan 07, Feb 04…) rather than month names due to Altair temporal auto-tick behavior; December data point at right edge has no corresponding axis label visible.
39+
Legibility verdict: PASS all text readable; minor concern: December point near right edge with no axis label
4640
4741
Dark render (plot-dark.png):
48-
Background: Warm near-black (#1A1A17) - matches required dark surface
49-
Chrome: Title, axis labels, tick labels all rendered in light text (#F0EFE8 / #B8B7B0) - clearly readable against dark background. No dark-on-dark failures found. Grid lines subtle at 15% opacity of off-white ink token.
50-
Data: Same teal (#009E73) line and markers - identical colors to light render as required. Only chrome (background, text, grid) flipped between themes.
51-
Legibility verdict: PASS - all text readable, no dark-on-dark issues detected.
42+
Background: Warm near-black (#1A1A17) — correct
43+
Chrome: Title and axis labels rendered in light cream text clearly visible against dark background. Tick labels in muted light (#B8B7B0). No dark-on-dark failures observed. Grid lines subtle with low opacity. 4-sided border frame adapts to light stroke color.
44+
Data: Brand green (#009E73) line and markers identical colors to light render. Same sinusoidal pattern visible. Identical layout and data positions.
45+
Legibility verdict: PASS all text readable in dark theme; theme adaptation is correct throughout
5246
criteria_checklist:
5347
visual_quality:
5448
score: 29
@@ -59,71 +53,71 @@ review:
5953
score: 8
6054
max: 8
6155
passed: true
62-
comment: 'Font sizes explicitly set: title 28px, axis 22px, ticks 18px; all
63-
readable in both themes'
56+
comment: 'All font sizes explicitly set: title 28px, axis labels 22px, tick
57+
labels 18px — readable in both themes'
6458
- id: VQ-02
6559
name: No Overlap
6660
score: 6
6761
max: 6
6862
passed: true
69-
comment: No overlapping text or elements
63+
comment: No overlapping elements
7064
- id: VQ-03
7165
name: Element Visibility
7266
score: 6
7367
max: 6
7468
passed: true
75-
comment: strokeWidth=4, marker size=200; line and points clearly visible
69+
comment: Line strokeWidth=4, markers size=200 — well adapted for 12 data points
7670
- id: VQ-04
7771
name: Color Accessibility
7872
score: 2
7973
max: 2
8074
passed: true
81-
comment: Single series in CVD-safe brand green; high contrast on both surfaces
75+
comment: Brand green good contrast on both backgrounds, CVD-safe
8276
- id: VQ-05
8377
name: Layout & Canvas
8478
score: 3
8579
max: 4
8680
passed: true
87-
comment: Good proportions overall; last data point (December) partially clipped
88-
at right edge
81+
comment: December data point at right edge with no December axis label; Altair
82+
temporal auto-ticks show weekly dates misaligned with monthly data
8983
- id: VQ-06
9084
name: Axis Labels & Title
9185
score: 2
9286
max: 2
9387
passed: true
94-
comment: Temperature (C) with units on Y; Month on X
88+
comment: Month (X) and Temperature (°C) with units
9589
- id: VQ-07
9690
name: Palette Compliance
9791
score: 2
9892
max: 2
9993
passed: true
100-
comment: 'Data uses #009E73, backgrounds are #FAF8F1/#1A1A17, theme-adaptive
101-
chrome correct in both renders'
94+
comment: '#009E73 first series, correct PAGE_BG in both themes, all chrome
95+
theme-adaptive'
10296
design_excellence:
103-
score: 8
97+
score: 9
10498
max: 20
10599
items:
106100
- id: DE-01
107101
name: Aesthetic Sophistication
108102
score: 4
109103
max: 8
110104
passed: false
111-
comment: 'Well-configured above generic: brand color, explicit sizes. Polished
112-
default but not publication-exceptional.'
105+
comment: Well-configured default — warm background and explicit theming raise
106+
it above basics, but no aesthetic ambition beyond functional
113107
- id: DE-02
114108
name: Visual Refinement
115-
score: 2
109+
score: 3
116110
max: 6
117111
passed: false
118-
comment: Full grid both axes (Y-only recommended for line charts); all four
119-
spines visible; x-axis shows specific dates not clean month names
112+
comment: Grid opacity/colors explicitly set but full 2-axis grid (Y-only preferred
113+
for line) and 4-sided border frame reduce refinement score
120114
- id: DE-03
121115
name: Data Storytelling
122116
score: 2
123117
max: 6
124118
passed: false
125-
comment: Data displayed but not actively interpreted; no emphasis on seasonal
126-
peak, no area fill, no focal-point annotation
119+
comment: Seasonal pattern is clear but no visual emphasis on peak (no annotation,
120+
no highlighted marker, no gradient)
127121
spec_compliance:
128122
score: 15
129123
max: 15
@@ -133,25 +127,26 @@ review:
133127
score: 5
134128
max: 5
135129
passed: true
136-
comment: Correct single-series basic line chart
130+
comment: Correct line chart with optional markers
137131
- id: SC-02
138132
name: Required Features
139133
score: 4
140134
max: 4
141135
passed: true
142-
comment: Clean minimal design, axis labels, grid lines, optional markers shown
136+
comment: Grid, axis labels, markers, clean minimal design
143137
- id: SC-03
144138
name: Data Mapping
145139
score: 3
146140
max: 3
147141
passed: true
148-
comment: Month on X, Temperature on Y, all 12 data points correctly mapped
142+
comment: MonthX, TemperatureY, all 12 data points visible
149143
- id: SC-04
150144
name: Title & Legend
151145
score: 3
152146
max: 3
153147
passed: true
154-
comment: Title matches required format; single series so no legend needed
148+
comment: Exact format 'line-basic · altair · anyplot.ai'; single series so
149+
legend N/A
155150
data_quality:
156151
score: 15
157152
max: 15
@@ -161,22 +156,19 @@ review:
161156
score: 6
162157
max: 6
163158
passed: true
164-
comment: Shows trend, variation, and complete seasonal cycle with ascending
165-
and descending phases
159+
comment: Full annual cycle with rising/falling trends and both extremes visible
166160
- id: DQ-02
167161
name: Realistic Context
168162
score: 5
169163
max: 5
170164
passed: true
171-
comment: Monthly temperature readings for a year; realistic neutral scientific
172-
scenario
165+
comment: Monthly temperature readings — neutral, real-world scenario
173166
- id: DQ-03
174167
name: Appropriate Scale
175168
score: 4
176169
max: 4
177170
passed: true
178-
comment: Temperature range ~4-30C is factually realistic for mid-latitude
179-
location with distinct seasons
171+
comment: ~3–30°C range, plausible northern hemisphere annual pattern
180172
code_quality:
181173
score: 10
182174
max: 10
@@ -186,32 +178,31 @@ review:
186178
score: 3
187179
max: 3
188180
passed: true
189-
comment: 'Linear: imports -> tokens -> data -> plot -> save; no functions
190-
or classes'
181+
comment: Clean imports→tokens→data→plot→save structure
191182
- id: CQ-02
192183
name: Reproducibility
193184
score: 2
194185
max: 2
195186
passed: true
196-
comment: np.random.seed(42) set
187+
comment: np.random.seed(42)
197188
- id: CQ-03
198189
name: Clean Imports
199190
score: 2
200191
max: 2
201192
passed: true
202-
comment: Only os, altair, numpy, pandas; all are used
193+
comment: All imports used
203194
- id: CQ-04
204195
name: Code Elegance
205196
score: 2
206197
max: 2
207198
passed: true
208-
comment: Clean Pythonic code; appropriate complexity; no over-engineering
199+
comment: Clean Altair layering idiom
209200
- id: CQ-05
210201
name: Output & API
211202
score: 1
212203
max: 1
213204
passed: true
214-
comment: Saves both plot-{THEME}.png and plot-{THEME}.html correctly
205+
comment: Saves plot-{THEME}.png and plot-{THEME}.html with scale_factor=3.0
215206
library_mastery:
216207
score: 8
217208
max: 10
@@ -221,25 +212,25 @@ review:
221212
score: 5
222213
max: 5
223214
passed: true
224-
comment: Expertly uses encoding types (T, Q), configure_* chain, properties();
225-
correct layering pattern
215+
comment: Layer composition, encoding classes (alt.X/Y/Tooltip), configure_*
216+
theming, interactive() — all idiomatic Altair
226217
- id: LM-02
227218
name: Distinctive Features
228219
score: 3
229220
max: 5
230221
passed: true
231-
comment: Uses Altair-distinctive layer composition (line + points via + operator),
232-
interactive tooltips with alt.Tooltip custom formatting, temporal encoding
233-
(T type)
234-
verdict: REJECTED
222+
comment: Altair's grammar-of-graphics layer composition (line + points), interactive
223+
tooltips, HTML export
224+
verdict: APPROVED
235225
impl_tags:
236226
dependencies: []
237227
techniques:
238-
- layer-composition
239228
- hover-tooltips
240229
- html-export
230+
- layer-composition
241231
patterns:
242232
- data-generation
243233
dataprep:
244234
- time-series
245-
styling: []
235+
styling:
236+
- grid-styling

0 commit comments

Comments
 (0)