Skip to content

Commit 2d87535

Browse files
chore(bokeh): update quality score 89 and review feedback for ecdf-basic
1 parent bc3ccf7 commit 2d87535

2 files changed

Lines changed: 262 additions & 10 deletions

File tree

plots/ecdf-basic/implementations/python/bokeh.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
ecdf-basic: Basic ECDF Plot
3-
Library: bokeh | Python 3.13
4-
Quality: pending | Created: 2026-06-25
3+
Library: bokeh 3.9.1 | Python 3.13.14
4+
Quality: 89/100 | Updated: 2026-06-25
55
"""
66

77
import io
Lines changed: 259 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# Per-library metadata for bokeh implementation of ecdf-basic
2-
# Auto-generated by impl-generate.yml
3-
41
library: bokeh
52
language: python
63
specification_id: ecdf-basic
74
created: '2025-12-23T13:02:55Z'
8-
updated: '2026-06-25T09:36:19Z'
5+
updated: '2026-06-25T09:44:35Z'
96
generated_by: claude-sonnet
107
workflow_run: 28160456663
118
issue: 976
@@ -15,7 +12,262 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/ecdf-basi
1512
preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/ecdf-basic/python/bokeh/plot-dark.png
1613
preview_html_light: https://storage.googleapis.com/anyplot-images/plots/ecdf-basic/python/bokeh/plot-light.html
1714
preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/ecdf-basic/python/bokeh/plot-dark.html
18-
quality_score: null
15+
quality_score: 89
1916
review:
20-
strengths: []
21-
weaknesses: []
17+
strengths:
18+
- Correct ECDF step function with mode=after producing accurate 1/n increments
19+
- Realistic marathon finish times dataset (300 runners, mean 240 min) — plausible
20+
and neutral
21+
- IQR band + area fill + staggered percentile annotations create strong distribution
22+
storytelling
23+
- 'Excellent bokeh model usage: ColumnDataSource, HoverTool vline mode, BoxAnnotation,
24+
Span, Label, varea'
25+
- Perfect theme-adaptive chrome in both light and dark renders — no dark-on-dark
26+
issues
27+
- 'Perfect code quality: seed set, clean imports, KISS structure, correct file output'
28+
weaknesses:
29+
- 'DE-01 (5/8): Design just misses the 6/8 threshold — IQR band and annotations
30+
add clear value but overall presentation could be stronger. Consider increasing
31+
title weight, adding a subtle note about distribution shape, or differentiating
32+
the percentile annotation style more clearly from tick labels.'
33+
- 'VQ-01 (7/8): Percentile annotation labels at 26pt are smaller than tick labels
34+
(34pt), reducing mobile legibility when the PNG scales to ~400px. Increase to
35+
30pt to ensure tertiary labels remain readable at thumbnail size.'
36+
- 'LM-02 (3/5): HoverTool and CrosshairTool are used but somewhat generically. Consider
37+
leveraging a TapTool, Slider widget, or custom JS callback to show more distinctively
38+
Bokeh-specific interactivity.'
39+
image_description: |-
40+
Light render (plot-light.png):
41+
Background: Warm off-white #FAF8F1 — correct, not pure white
42+
Chrome: Title "Marathon Finish Times · ecdf-basic · python · bokeh · anyplot.ai" in bold dark ink, fills ~70% of canvas width (expected for mandated title length). Y-axis label "Cumulative Proportion of Runners" and X-axis label "Finish Time (minutes)" in dark italic-styled axis labels at 42pt. Tick labels at 34pt in INK_SOFT (#4A4A44). All text clearly readable against the warm off-white background.
43+
Data: Single ECDF step line in brand green #009E73 at 4.5pt width, rising from (150,0) to (375,1). Light-green area fill (alpha=0.07) under the curve. Slightly more opaque IQR box annotation (alpha=0.08) from Q1≈218 to Q3≈260. Dashed vertical lines at Q1/Q2/Q3. Staggered italic annotations "25th: 218 min", "50th (median): 242 min", "75th: 260 min" at y=0.03/0.09/0.15 in INK_SOFT. Horizontal dotted reference line at y=0.5.
44+
Legibility verdict: PASS — all text readable, no light-on-light issues
45+
46+
Dark render (plot-dark.png):
47+
Background: Warm near-black #1A1A17 — correct, not pure black
48+
Chrome: Title, axis labels, and tick labels all rendered in light-colored text (#F0EFE8 for title/axis labels, #B8B7B0 for ticks and annotations). All text clearly readable against the dark background. No dark-on-dark issues.
49+
Data: ECDF step line in identical brand green #009E73 — same color as light render, confirms data colors don't flip between themes. IQR band and area fill create subtle dark-greenish tones against the near-black background. Percentile annotation text in #B8B7B0 is clearly readable.
50+
Legibility verdict: PASS — no dark-on-dark failures; all text readable in dark theme
51+
criteria_checklist:
52+
visual_quality:
53+
score: 29
54+
max: 30
55+
items:
56+
- id: VQ-01
57+
name: Text Legibility
58+
score: 7
59+
max: 8
60+
passed: true
61+
comment: 'All font sizes explicitly set (title 50pt, axis 42pt, ticks 34pt,
62+
annotations 26pt). Well-proportioned and readable at canvas size. Minor
63+
deduction: 26pt percentile annotations are below tick label size (34pt)
64+
— may be marginal at ~400px mobile scale.'
65+
- id: VQ-02
66+
name: No Overlap
67+
score: 6
68+
max: 6
69+
passed: true
70+
comment: Staggered annotations at y=0.03/0.09/0.15 cleanly separated. No text
71+
overlaps data or other text elements.
72+
- id: VQ-03
73+
name: Element Visibility
74+
score: 6
75+
max: 6
76+
passed: true
77+
comment: ECDF line at 4.5pt is appropriately prominent for 300-point data.
78+
Area fill and IQR band are supporting elements that do not obscure the main
79+
step line.
80+
- id: VQ-04
81+
name: Color Accessibility
82+
score: 2
83+
max: 2
84+
passed: true
85+
comment: Single series with brand green on warm off-white/near-black. High
86+
contrast in both themes. No CVD issues.
87+
- id: VQ-05
88+
name: Layout & Canvas
89+
score: 4
90+
max: 4
91+
passed: true
92+
comment: No canvas gate failure. Generous min_border_* margins. Plot utilizes
93+
canvas well with no overflow or clipping.
94+
- id: VQ-06
95+
name: Axis Labels & Title
96+
score: 2
97+
max: 2
98+
passed: true
99+
comment: 'X: ''Finish Time (minutes)'' — descriptive with units. Y: ''Cumulative
100+
Proportion of Runners'' — descriptive. Title in correct {Descriptive} ·
101+
{spec-id} · {lang} · {lib} · anyplot.ai format.'
102+
- id: VQ-07
103+
name: Palette Compliance
104+
score: 2
105+
max: 2
106+
passed: true
107+
comment: 'First/only series uses #009E73 brand green. Light background #FAF8F1,
108+
dark background #1A1A17. All chrome tokens correctly flip between themes.'
109+
design_excellence:
110+
score: 13
111+
max: 20
112+
items:
113+
- id: DE-01
114+
name: Aesthetic Sophistication
115+
score: 5
116+
max: 8
117+
passed: true
118+
comment: 'Above ''well-configured default'' (4): IQR band, area fill, staggered
119+
percentile annotations, and median reference line show intentional aesthetic
120+
choices. Not yet ''strong design'' (6) — limited to single series, and the
121+
overall visual feel is clean but not publication-ready.'
122+
- id: DE-02
123+
name: Visual Refinement
124+
score: 4
125+
max: 6
126+
passed: true
127+
comment: 'Good refinement: box outline removed (outline_line_color=None),
128+
y-only grid at alpha=0.10 (very subtle), no minor ticks, no toolbar. Axis
129+
lines remain (not full L-shape removal). Above default but not ''every detail
130+
polished''.'
131+
- id: DE-03
132+
name: Data Storytelling
133+
score: 4
134+
max: 6
135+
passed: true
136+
comment: 'Good storytelling: IQR band creates focal emphasis on distribution
137+
spread, staggered percentile annotations enable direct value reading, horizontal
138+
reference at y=0.5 makes median reading effortless. Clearly above ''data
139+
displayed but not interpreted'' (2).'
140+
spec_compliance:
141+
score: 15
142+
max: 15
143+
items:
144+
- id: SC-01
145+
name: Plot Type
146+
score: 5
147+
max: 5
148+
passed: true
149+
comment: Correct ECDF step function using p.step with mode='after' — accurate
150+
1/n increments at each observation.
151+
- id: SC-02
152+
name: Required Features
153+
score: 4
154+
max: 4
155+
passed: true
156+
comment: Step function, y-range 0-1.05, y-axis grid lines, distinct line style
157+
— all present.
158+
- id: SC-03
159+
name: Data Mapping
160+
score: 3
161+
max: 3
162+
passed: true
163+
comment: X=finish time (minutes), Y=cumulative proportion (0-1). All 300 data
164+
points plotted.
165+
- id: SC-04
166+
name: Title & Legend
167+
score: 3
168+
max: 3
169+
passed: true
170+
comment: 'Title: ''Marathon Finish Times · ecdf-basic · python · bokeh · anyplot.ai''
171+
— correct format. No legend (single series, N/A).'
172+
data_quality:
173+
score: 15
174+
max: 15
175+
items:
176+
- id: DQ-01
177+
name: Feature Coverage
178+
score: 6
179+
max: 6
180+
passed: true
181+
comment: ECDF with full distribution, IQR highlighted, percentile markers
182+
(Q1/Q2/Q3), area fill — covers all key aspects of ECDF visualization.
183+
- id: DQ-02
184+
name: Realistic Context
185+
score: 5
186+
max: 5
187+
passed: true
188+
comment: Marathon finish times for 300 recreational runners — real, neutral,
189+
plausible domain. Normal distribution (mean=240min, SD=32min) is realistic.
190+
- id: DQ-03
191+
name: Appropriate Scale
192+
score: 4
193+
max: 4
194+
passed: true
195+
comment: 240 min (4h) mean with 32 min SD yields range ~150-375 min — factually
196+
correct for recreational marathon times. 300 runners matches spec range
197+
of 50-500.
198+
code_quality:
199+
score: 10
200+
max: 10
201+
items:
202+
- id: CQ-01
203+
name: KISS Structure
204+
score: 3
205+
max: 3
206+
passed: true
207+
comment: 'Linear top-level structure: imports → data → ECDF calc → plot →
208+
save. No functions or classes.'
209+
- id: CQ-02
210+
name: Reproducibility
211+
score: 2
212+
max: 2
213+
passed: true
214+
comment: np.random.seed(42) set.
215+
- id: CQ-03
216+
name: Clean Imports
217+
score: 2
218+
max: 2
219+
passed: true
220+
comment: 'All imports used: io, os, sys, time, Path, numpy, bokeh models,
221+
PIL, selenium.'
222+
- id: CQ-04
223+
name: Code Elegance
224+
score: 2
225+
max: 2
226+
passed: true
227+
comment: Clean Pythonic code. The staircase fill computation is appropriate.
228+
No fake UI.
229+
- id: CQ-05
230+
name: Output & API
231+
score: 1
232+
max: 1
233+
passed: true
234+
comment: Saves plot-{THEME}.html via output_file/save and plot-{THEME}.png
235+
via Selenium + PIL crop. Correct naming.
236+
library_mastery:
237+
score: 7
238+
max: 10
239+
items:
240+
- id: LM-01
241+
name: Idiomatic Usage
242+
score: 4
243+
max: 5
244+
passed: true
245+
comment: 'Strong bokeh idioms: ColumnDataSource, HoverTool (vline mode), CrosshairTool,
246+
BoxAnnotation, Span, Label, varea, step renderer with mode=''after''. Above
247+
default (3).'
248+
- id: LM-02
249+
name: Distinctive Features
250+
score: 3
251+
max: 5
252+
passed: true
253+
comment: HoverTool with vline mode showing cumulative proportion and BoxAnnotation
254+
for IQR are Bokeh-distinctive. Interactive HTML artifact alongside PNG is
255+
Bokeh-specific. Above default (1) but could push further with more advanced
256+
interactivity.
257+
verdict: REJECTED
258+
impl_tags:
259+
dependencies:
260+
- selenium
261+
- pillow
262+
techniques:
263+
- hover-tooltips
264+
- html-export
265+
- annotations
266+
patterns:
267+
- data-generation
268+
- columndatasource
269+
dataprep:
270+
- cumulative-sum
271+
styling:
272+
- alpha-blending
273+
- grid-styling

0 commit comments

Comments
 (0)