Skip to content

Commit cfc04b6

Browse files
chore(altair): update quality score 94 and review feedback for scatter-marginal
1 parent 7932bb1 commit cfc04b6

2 files changed

Lines changed: 220 additions & 9 deletions

File tree

plots/scatter-marginal/implementations/python/altair.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
"""anyplot.ai
1+
""" anyplot.ai
22
scatter-marginal: Scatter Plot with Marginal Distributions
3-
Library: altair | Python 3.13
4-
Quality: pending | Created: 2025-12-26
3+
Library: altair 6.1.0 | Python 3.13.13
4+
Quality: 94/100 | Updated: 2026-05-09
55
"""
66

77
import os
Lines changed: 217 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# Per-library metadata for altair implementation of scatter-marginal
2-
# Auto-generated by impl-generate.yml
3-
41
library: altair
52
language: python
63
specification_id: scatter-marginal
74
created: '2025-12-26T14:59:05Z'
8-
updated: '2026-05-09T05:25:28Z'
5+
updated: '2026-05-09T05:28:48Z'
96
generated_by: claude-haiku
107
workflow_run: 25592784974
118
issue: 2005
@@ -15,7 +12,221 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/scatter-m
1512
preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/scatter-marginal/python/altair/plot-dark.png
1613
preview_html_light: https://storage.googleapis.com/anyplot-images/plots/scatter-marginal/python/altair/plot-light.html
1714
preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/scatter-marginal/python/altair/plot-dark.html
18-
quality_score: null
15+
quality_score: 94
1916
review:
20-
strengths: []
17+
strengths:
18+
- 'Perfect visual quality: readable text in both themes, no overlap, excellent element
19+
visibility'
20+
- 'Precise theme compliance: correct backgrounds, all chrome tokens applied, data
21+
colors theme-invariant'
22+
- 'Expert Altair usage: idiomatic composition with vconcat/hconcat, scale sharing,
23+
configuration methods'
24+
- 'Excellent spec compliance: all marginal features present, proper alignment, correct
25+
transparency values'
26+
- 'Clean code: simple linear structure, deterministic data, all imports used, Pythonic
27+
style'
28+
- 'Strong data storytelling: composite design effectively communicates bivariate
29+
relationship and individual distributions'
2130
weaknesses: []
31+
image_description: |-
32+
Light render (plot-light.png):
33+
Background: Warm off-white (#FAF8F1), correct theme color
34+
Chrome: Title "scatter-marginal · altair · anyplot.ai" in dark text (28px), clearly readable. Axis labels "X Value (units)" and "Y Value (units)" in dark secondary text (20px), legible. Tick labels in small dark text (16px), all readable. Grid lines subtle (10% opacity) in light gray.
35+
Data: Scatter points in Okabe-Ito brand green (#009E73) with 0.65 opacity. Top histogram with same green at 0.5 opacity. Right histogram with same green at 0.5 opacity. All data elements clearly visible against light background.
36+
Legibility verdict: PASS - All text is dark, providing strong contrast against light background. No light-on-light issues. Data colors are vibrant and distinct.
37+
38+
Dark render (plot-dark.png):
39+
Background: Warm near-black (#1A1A17), correct dark theme color
40+
Chrome: Title in light color, clearly readable against dark background. Axis labels in light secondary color (INK_SOFT token), legible. Tick labels in light color, all readable. Grid lines visible in light gray with 10% opacity.
41+
Data: Scatter points in identical Okabe-Ito brand green (#009E73, 0.65 opacity) - same as light render. Top and right histograms in same green (0.5 opacity). All data colors unchanged from light render, confirming theme-invariant coloring.
42+
Legibility verdict: PASS - All text is light-colored, providing strong contrast against dark background. No dark-on-dark text issues. Brand green (#009E73) remains vibrant and readable. Both renders are equally readable.
43+
criteria_checklist:
44+
visual_quality:
45+
score: 30
46+
max: 30
47+
items:
48+
- id: VQ-01
49+
name: Text Legibility
50+
score: 8
51+
max: 8
52+
passed: true
53+
comment: Title 28px, labels 20px, ticks 16px all explicitly set and readable
54+
in both themes
55+
- id: VQ-02
56+
name: No Overlap
57+
score: 6
58+
max: 6
59+
passed: true
60+
comment: No overlapping elements; marginals properly spaced
61+
- id: VQ-03
62+
name: Element Visibility
63+
score: 6
64+
max: 6
65+
passed: true
66+
comment: Markers size=120 opacity=0.65 well-scaled for 150 points; histograms
67+
clearly visible
68+
- id: VQ-04
69+
name: Color Accessibility
70+
score: 2
71+
max: 2
72+
passed: true
73+
comment: 'CVD-safe Okabe-Ito #009E73; good contrast; no red-green coding'
74+
- id: VQ-05
75+
name: Layout & Canvas
76+
score: 4
77+
max: 4
78+
passed: true
79+
comment: Composite layout fills canvas well; balanced spacing (1000x120 top,
80+
1000x600 main, 120x600 right)
81+
- id: VQ-06
82+
name: Axis Labels & Title
83+
score: 2
84+
max: 2
85+
passed: true
86+
comment: Descriptive labels with units; spec-compliant title format
87+
- id: VQ-07
88+
name: Palette Compliance
89+
score: 2
90+
max: 2
91+
passed: true
92+
comment: 'Perfect: first series #009E73; backgrounds #FAF8F1 (light) / #1A1A17
93+
(dark); theme tokens correctly applied in both renders'
94+
design_excellence:
95+
score: 15
96+
max: 20
97+
items:
98+
- id: DE-01
99+
name: Aesthetic Sophistication
100+
score: 5
101+
max: 8
102+
passed: true
103+
comment: Thoughtfully executed composite design; professional; intentional
104+
theme support
105+
- id: DE-02
106+
name: Visual Refinement
107+
score: 5
108+
max: 6
109+
passed: true
110+
comment: Subtle grid (10% opacity); clean spines; generous spacing; marginals
111+
simplified appropriately
112+
- id: DE-03
113+
name: Data Storytelling
114+
score: 5
115+
max: 6
116+
passed: true
117+
comment: Composite layout effectively communicates bivariate relationship
118+
+ distributions; clear visual hierarchy
119+
spec_compliance:
120+
score: 15
121+
max: 15
122+
items:
123+
- id: SC-01
124+
name: Plot Type
125+
score: 5
126+
max: 5
127+
passed: true
128+
comment: Correct scatter-marginal with aligned histograms on top and right
129+
- id: SC-02
130+
name: Required Features
131+
score: 4
132+
max: 4
133+
passed: true
134+
comment: 'All spec requirements: main scatter, marginals, alignment, transparency'
135+
- id: SC-03
136+
name: Data Mapping
137+
score: 3
138+
max: 3
139+
passed: true
140+
comment: X/Y correctly assigned; axes show all data with appropriate domains
141+
- id: SC-04
142+
name: Title & Legend
143+
score: 3
144+
max: 3
145+
passed: true
146+
comment: Title format correct; axis labels descriptive with units
147+
data_quality:
148+
score: 14
149+
max: 15
150+
items:
151+
- id: DQ-01
152+
name: Feature Coverage
153+
score: 6
154+
max: 6
155+
passed: true
156+
comment: 'Shows all aspects: bivariate correlation, marginal distributions,
157+
density patterns'
158+
- id: DQ-02
159+
name: Realistic Context
160+
score: 4
161+
max: 5
162+
passed: true
163+
comment: Plausible synthetic data (y = 0.7*x + noise); sensible domain; neutral
164+
context
165+
- id: DQ-03
166+
name: Appropriate Scale
167+
score: 4
168+
max: 4
169+
passed: true
170+
comment: Proportions correct; relationship realistic; no impossible values
171+
code_quality:
172+
score: 10
173+
max: 10
174+
items:
175+
- id: CQ-01
176+
name: KISS Structure
177+
score: 3
178+
max: 3
179+
passed: true
180+
comment: 'Clean linear flow: imports → seed → data → charts → save'
181+
- id: CQ-02
182+
name: Reproducibility
183+
score: 2
184+
max: 2
185+
passed: true
186+
comment: np.random.seed(42) set; deterministic
187+
- id: CQ-03
188+
name: Clean Imports
189+
score: 2
190+
max: 2
191+
passed: true
192+
comment: All imports (os, sys, Path, altair, numpy, pandas) are used
193+
- id: CQ-04
194+
name: Code Elegance
195+
score: 2
196+
max: 2
197+
passed: true
198+
comment: Pythonic, appropriate complexity; no fake functionality
199+
- id: CQ-05
200+
name: Output & API
201+
score: 1
202+
max: 1
203+
passed: true
204+
comment: Correct output format (plot-{THEME}.png + .html); current API
205+
library_mastery:
206+
score: 10
207+
max: 10
208+
items:
209+
- id: LM-01
210+
name: Idiomatic Usage
211+
score: 5
212+
max: 5
213+
passed: true
214+
comment: 'Expert use of Altair API: mark_circle, mark_bar, vconcat/hconcat,
215+
scale domains, configuration methods'
216+
- id: LM-02
217+
name: Distinctive Features
218+
score: 5
219+
max: 5
220+
passed: true
221+
comment: Excellent use of Altair's composable plots, encoding-driven styling,
222+
shared scale domains
223+
verdict: APPROVED
224+
impl_tags:
225+
dependencies: []
226+
techniques:
227+
- subplots
228+
patterns:
229+
- data-generation
230+
dataprep: []
231+
styling:
232+
- alpha-blending

0 commit comments

Comments
 (0)