Skip to content

Commit b7eeb3e

Browse files
chore(bokeh): update quality score 88 and review feedback for lollipop-basic
1 parent 211f32e commit b7eeb3e

2 files changed

Lines changed: 262 additions & 9 deletions

File tree

plots/lollipop-basic/implementations/python/bokeh.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
"""anyplot.ai
1+
""" anyplot.ai
22
lollipop-basic: Basic Lollipop Chart
3-
Library: bokeh 3.9.0 | Python 3.14.4
3+
Library: bokeh 3.9.1 | Python 3.13.14
4+
Quality: 88/100 | Updated: 2026-07-01
45
"""
56

67
import sys
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 lollipop-basic
2-
# Auto-generated by impl-generate.yml
3-
41
library: bokeh
52
language: python
63
specification_id: lollipop-basic
74
created: '2025-12-23T15:14:01Z'
8-
updated: '2026-07-01T05:59:34Z'
5+
updated: '2026-07-01T06:06:30Z'
96
generated_by: claude-sonnet
107
workflow_run: 28496532200
118
issue: 934
@@ -15,7 +12,262 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/lollipop-
1512
preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/lollipop-basic/python/bokeh/plot-dark.png
1613
preview_html_light: https://storage.googleapis.com/anyplot-images/plots/lollipop-basic/python/bokeh/plot-light.html
1714
preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/lollipop-basic/python/bokeh/plot-dark.html
18-
quality_score: null
15+
quality_score: 88
1916
review:
20-
strengths: []
21-
weaknesses: []
17+
strengths:
18+
- 'Perfect visual quality: all font sizes explicitly set (50pt title, 42pt axis
19+
labels, 34pt tick labels, 24pt value annotations), well-proportioned layout, readable
20+
in both themes'
21+
- 'Excellent data storytelling: dashed average reference line (Span) provides immediate
22+
context for above/below-budget services; data sorted descending creates clear
23+
visual ranking'
24+
- Value labels above every lollipop head ($94K, $67K, …) eliminate the need to read
25+
the y-axis for each bar, reducing cognitive load
26+
- 'Idiomatic Bokeh usage: ColumnDataSource with named columns, Range1d for axis
27+
bounds, NumeralTickFormatter for dollar ticks, Span for the reference line, proper
28+
HTML + Selenium screenshot pipeline'
29+
- Realistic, neutral cloud-spend dataset with plausible values ($6K–$94K/month),
30+
deterministic data, and clean KISS code structure
31+
- 'Correct Imprint palette compliance: brand green #009E73 for single series, #FAF8F1/#1A1A17
32+
backgrounds, full theme-adaptive chrome (INK/INK_SOFT tokens on all labels and
33+
axes)'
34+
weaknesses:
35+
- 'SC-04: Title is missing the ''python'' language component. Required format: ''lollipop-basic
36+
· python · bokeh · anyplot.ai''. Current title: ''lollipop-basic · bokeh · anyplot.ai''.
37+
Fix: add '' · python'' between spec-id and library name in the title string.'
38+
- 'DE-02: Full rectangular outline border (outline_line_color=INK_SOFT) creates
39+
an all-four-sides box. Style guide prefers L-spine (remove top and right). Fix:
40+
set p.outline_line_color=None and rely on p.xaxis.axis_line_color + p.yaxis.axis_line_color
41+
for the bottom/left spines only.'
42+
- 'DE-01: Design is above the generic default but not at ''strong design'' level
43+
— could use one more differentiating touch, e.g. coloring lollipop heads above-average
44+
vs below-average (brand green vs muted), or adding a subtle ''Average: $34.7K''
45+
text annotation to the reference line.'
46+
image_description: |-
47+
Light render (plot-light.png):
48+
Background: Warm off-white consistent with #FAF8F1 — not pure white, not neutral grey. Correct theme surface.
49+
Chrome: Title "lollipop-basic · bokeh · anyplot.ai" in bold dark text, clearly readable. X-axis label "Cloud Service" and Y-axis label "Monthly Spend (USD)" in Bokeh's default italic style, both readable in dark ink. Tick labels on x-axis (10 rotated category names) and y-axis ($0–$100,000 in dollar format) are readable in INK_SOFT. A subtle dashed horizontal reference line sits at approximately $35K (average spend). Rectangular outline border visible around the data area (all four sides in INK_SOFT).
50+
Data: Brand green (#009E73) stems (vertical lines) and large filled circular markers for all 10 categories. Value annotations above each lollipop head ($94K, $67K, $48K, $38K, $28K, $22K, $18K, $12K, $9K, $6K) in INK_SOFT at 24pt. Data sorted descending from Compute to Monitoring. Y-axis grid lines only, subtle alpha ≈ 0.10.
51+
Legibility verdict: PASS — all text clearly readable against the warm off-white background. No "light on light" failures.
52+
53+
Dark render (plot-dark.png):
54+
Background: Warm near-black consistent with #1A1A17 — not pure black. Correct theme surface.
55+
Chrome: Title, axis labels, and tick labels rendered in light text (F0EFE8 / B8B7B0 range), clearly readable against the dark background. Reference line visible as a subtle dashed light-grey stroke. Same rectangular outline border visible in a lighter tone.
56+
Data: Brand green (#009E73) stems and circular markers are identical in color to the light render — only chrome elements flipped. Value annotation labels visible in lighter text above each marker. Grid lines subtle and visible.
57+
Legibility verdict: PASS — all text clearly readable against the warm near-black background. No dark-on-dark failures. Title, axis labels, tick labels, and value annotations all have adequate contrast.
58+
criteria_checklist:
59+
visual_quality:
60+
score: 30
61+
max: 30
62+
items:
63+
- id: VQ-01
64+
name: Text Legibility
65+
score: 8
66+
max: 8
67+
passed: true
68+
comment: 'All font sizes explicitly set: 50pt title, 42pt axis labels, 34pt
69+
tick labels, 24pt value annotations. Balanced X/Y sizing. Readable in both
70+
themes.'
71+
- id: VQ-02
72+
name: No Overlap
73+
score: 6
74+
max: 6
75+
passed: true
76+
comment: No overlapping elements. Value labels clear of markers. Category
77+
labels rotated to avoid collision.
78+
- id: VQ-03
79+
name: Element Visibility
80+
score: 6
81+
max: 6
82+
passed: true
83+
comment: '10 data points (sparse): size=42 markers and line_width=4 stems
84+
are appropriately prominent. Green pops against both backgrounds.'
85+
- id: VQ-04
86+
name: Color Accessibility
87+
score: 2
88+
max: 2
89+
passed: true
90+
comment: 'Single series in brand green #009E73. High contrast on both surface
91+
colors. CVD-safe.'
92+
- id: VQ-05
93+
name: Layout & Canvas
94+
score: 4
95+
max: 4
96+
passed: true
97+
comment: Canvas 3200×1800 correct. min_border settings (160/180/110/80) provide
98+
generous margins. Plot fills canvas well with no wasted space.
99+
- id: VQ-06
100+
name: Axis Labels & Title
101+
score: 2
102+
max: 2
103+
passed: true
104+
comment: '''Cloud Service'' and ''Monthly Spend (USD)'' — descriptive with
105+
units.'
106+
- id: VQ-07
107+
name: Palette Compliance
108+
score: 2
109+
max: 2
110+
passed: true
111+
comment: 'Single series uses #009E73 (Imprint position 1). Backgrounds #FAF8F1
112+
(light) / #1A1A17 (dark). INK/INK_SOFT tokens used for all chrome. Both
113+
renders theme-correct.'
114+
design_excellence:
115+
score: 12
116+
max: 20
117+
items:
118+
- id: DE-01
119+
name: Aesthetic Sophistication
120+
score: 5
121+
max: 8
122+
passed: true
123+
comment: 'Above a well-configured default: reference line, value annotations,
124+
custom sizing, and coherent brand color. Not at ''strong design'' level
125+
yet.'
126+
- id: DE-02
127+
name: Visual Refinement
128+
score: 3
129+
max: 6
130+
passed: true
131+
comment: 'Y-axis-only grid, minor ticks removed, appropriate whitespace. Downside:
132+
full rectangular outline border (outline_line_color=INK_SOFT) instead of
133+
L-spine removes the minimalist top/right spine effect.'
134+
- id: DE-03
135+
name: Data Storytelling
136+
score: 4
137+
max: 6
138+
passed: true
139+
comment: Average reference line immediately frames which services are above/below
140+
budget. Sorted descending makes ranking obvious. Value labels reduce chart-reading
141+
friction.
142+
spec_compliance:
143+
score: 13
144+
max: 15
145+
items:
146+
- id: SC-01
147+
name: Plot Type
148+
score: 5
149+
max: 5
150+
passed: true
151+
comment: 'Correct lollipop chart: segment() for stems, scatter() for circular
152+
markers at data values.'
153+
- id: SC-02
154+
name: Required Features
155+
score: 4
156+
max: 4
157+
passed: true
158+
comment: Thin stems from baseline, circular markers, vertical orientation
159+
(categories on x-axis), data sorted by value descending. All spec requirements
160+
met.
161+
- id: SC-03
162+
name: Data Mapping
163+
score: 3
164+
max: 3
165+
passed: true
166+
comment: 'X-axis: Cloud Service categories. Y-axis: Monthly Spend (USD). All
167+
10 data points visible.'
168+
- id: SC-04
169+
name: Title & Legend
170+
score: 1
171+
max: 3
172+
passed: false
173+
comment: 'Title ''lollipop-basic · bokeh · anyplot.ai'' is missing the ''python''
174+
language component. Required: ''lollipop-basic · python · bokeh · anyplot.ai''.
175+
No legend needed for single series (N/A).'
176+
data_quality:
177+
score: 15
178+
max: 15
179+
items:
180+
- id: DQ-01
181+
name: Feature Coverage
182+
score: 6
183+
max: 6
184+
passed: true
185+
comment: '10 categories showing full range of lollipop chart features: variable
186+
stem lengths, visible markers at different heights, value annotations.'
187+
- id: DQ-02
188+
name: Realistic Context
189+
score: 5
190+
max: 5
191+
passed: true
192+
comment: Monthly cloud infrastructure spend by service category — real, neutral,
193+
business context.
194+
- id: DQ-03
195+
name: Appropriate Scale
196+
score: 4
197+
max: 4
198+
passed: true
199+
comment: $6K–$94K monthly spend per service is realistic for a mid-sized tech
200+
company. Proportions between categories are plausible.
201+
code_quality:
202+
score: 10
203+
max: 10
204+
items:
205+
- id: CQ-01
206+
name: KISS Structure
207+
score: 3
208+
max: 3
209+
passed: true
210+
comment: 'No functions or classes. Clean top-to-bottom: imports → tokens →
211+
data → figure → styling → save.'
212+
- id: CQ-02
213+
name: Reproducibility
214+
score: 2
215+
max: 2
216+
passed: true
217+
comment: Deterministic hardcoded dataset. No randomness.
218+
- id: CQ-03
219+
name: Clean Imports
220+
score: 2
221+
max: 2
222+
passed: true
223+
comment: 'All imports used: io, os, time, pathlib, bokeh (figure, ColumnDataSource,
224+
NumeralTickFormatter, Range1d, Span, output_file, save), PIL.Image, selenium.webdriver.'
225+
- id: CQ-04
226+
name: Code Elegance
227+
score: 2
228+
max: 2
229+
passed: true
230+
comment: Clean and Pythonic. PIL crop trick for exact canvas dimensions is
231+
an elegant workaround for Bokeh/Chrome headless sizing issue.
232+
- id: CQ-05
233+
name: Output & API
234+
score: 1
235+
max: 1
236+
passed: true
237+
comment: Saves plot-{THEME}.png and plot-{THEME}.html. Uses current Bokeh
238+
3.9.0 API.
239+
library_mastery:
240+
score: 8
241+
max: 10
242+
items:
243+
- id: LM-01
244+
name: Idiomatic Usage
245+
score: 5
246+
max: 5
247+
passed: true
248+
comment: 'Expertly uses Bokeh patterns: ColumnDataSource with named columns,
249+
figure(x_range=categories) for categorical axis, segment()/scatter()/text()
250+
glyph methods, Span layout model, Range1d, NumeralTickFormatter, full Selenium
251+
screenshot pipeline.'
252+
- id: LM-02
253+
name: Distinctive Features
254+
score: 3
255+
max: 5
256+
passed: true
257+
comment: Span layout model for reference line is distinctly Bokeh. NumeralTickFormatter
258+
for dollar formatting. HTML export as a first-class artifact alongside the
259+
PNG. Could leverage HoverTool for additional distinctiveness.
260+
verdict: REJECTED
261+
impl_tags:
262+
dependencies:
263+
- selenium
264+
- pillow
265+
techniques:
266+
- annotations
267+
- html-export
268+
patterns:
269+
- data-generation
270+
- columndatasource
271+
dataprep: []
272+
styling:
273+
- grid-styling

0 commit comments

Comments
 (0)