From 8112e57fc21edb4ee16851b886e865eba0aaeb8e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 17 May 2026 23:31:08 +0000 Subject: [PATCH 1/3] chore(altair): add metadata for scatter-text --- .../implementations/python/altair.py | 80 ++++--- .../scatter-text/metadata/python/altair.yaml | 215 ++---------------- 2 files changed, 69 insertions(+), 226 deletions(-) diff --git a/plots/scatter-text/implementations/python/altair.py b/plots/scatter-text/implementations/python/altair.py index 5c0cb7bd5c..78b638baf8 100644 --- a/plots/scatter-text/implementations/python/altair.py +++ b/plots/scatter-text/implementations/python/altair.py @@ -1,13 +1,23 @@ -""" pyplots.ai +"""anyplot.ai scatter-text: Scatter Plot with Text Labels Instead of Points -Library: altair 6.0.0 | Python 3.13.11 -Quality: 91/100 | Created: 2026-01-09 +Library: altair | Python 3.13 +Quality: pending | Created: 2026-05-17 """ -import altair as alt +import os + import numpy as np import pandas as pd +from altair import Chart, Color, Legend, Scale, Title, Tooltip, X, Y, condition, selection_point, value + +# Theme tokens +THEME = os.getenv("ANYPLOT_THEME", "light") +PAGE_BG = "#FAF8F1" if THEME == "light" else "#1A1A17" +ELEVATED_BG = "#FFFDF6" if THEME == "light" else "#242420" +INK = "#1A1A17" if THEME == "light" else "#F0EFE8" +INK_SOFT = "#4A4A44" if THEME == "light" else "#B8B7B0" +BRAND = "#009E73" # Okabe-Ito position 1 # Data: Programming languages positioned by popularity vs age np.random.seed(42) @@ -44,7 +54,6 @@ ] # Simulated: x = language age (years), y = relative popularity score -# Data spread more evenly to avoid overlap ages = np.array( [33, 29, 26, 41, 29, 15, 9, 10, 13, 8, 20, 31, 12, 37, 30, 24, 34, 13, 17, 18, 31, 40, 68, 65, 66, 38, 19, 21] ) @@ -54,39 +63,56 @@ df = pd.DataFrame({"age": ages, "popularity": popularity, "language": languages, "year_created": 2026 - ages}) -# Create interactive scatter text plot using mark_text -# Selection for hover highlight - Altair's distinctive interactivity feature -hover = alt.selection_point(on="pointerover", nearest=True, empty=False) +# Selection for hover highlight +hover = selection_point(on="pointerover", nearest=True, empty=False) chart = ( - alt.Chart(df) + Chart(df) .mark_text(fontSize=14, fontWeight="bold") .encode( - x=alt.X("age:Q", title="Language Age (Years Since Creation)", scale=alt.Scale(domain=[-2, 75])), - y=alt.Y("popularity:Q", title="Relative Popularity Score", scale=alt.Scale(domain=[-2, 105])), + x=X("age:Q", title="Language Age (Years Since Creation)", scale=Scale(domain=[-2, 75])), + y=Y("popularity:Q", title="Relative Popularity Score", scale=Scale(domain=[-2, 105])), text="language:N", - color=alt.condition( - hover, - alt.value("#FF6B35"), - alt.Color("popularity:Q", scale=alt.Scale(scheme="viridis"), legend=alt.Legend(title="Popularity")), + color=condition( + hover, value(BRAND), Color("popularity:Q", scale=Scale(scheme="viridis"), legend=Legend(title="Popularity")) ), - size=alt.condition(hover, alt.value(18), alt.value(14)), + size=condition(hover, value(18), value(14)), tooltip=[ - alt.Tooltip("language:N", title="Language"), - alt.Tooltip("age:Q", title="Age (years)"), - alt.Tooltip("popularity:Q", title="Popularity Score"), - alt.Tooltip("year_created:Q", title="Year Created"), + Tooltip("language:N", title="Language"), + Tooltip("age:Q", title="Age (years)"), + Tooltip("popularity:Q", title="Popularity Score"), + Tooltip("year_created:Q", title="Year Created"), ], ) .add_params(hover) .properties( - width=1600, height=900, title=alt.Title(text="scatter-text · altair · pyplots.ai", fontSize=28, anchor="middle") + width=1600, + height=900, + background=PAGE_BG, + title=Title(text="scatter-text · Python · altair · anyplot.ai", fontSize=28, anchor="middle"), + ) + .configure_view(fill=PAGE_BG, stroke=INK_SOFT, strokeWidth=0) + .configure_axis( + domainColor=INK_SOFT, + tickColor=INK_SOFT, + gridColor=INK, + gridOpacity=0.10, + labelColor=INK_SOFT, + labelFontSize=18, + titleColor=INK, + titleFontSize=22, + ) + .configure_title(color=INK) + .configure_legend( + fillColor=ELEVATED_BG, + strokeColor=INK_SOFT, + labelColor=INK_SOFT, + titleColor=INK, + titleFontSize=18, + labelFontSize=16, ) - .configure_axis(labelFontSize=18, titleFontSize=22, gridOpacity=0.3) - .configure_view(strokeWidth=0) - .configure_legend(titleFontSize=18, labelFontSize=16) ) -# Save as PNG and HTML (HTML preserves interactivity) -chart.save("plot.png", scale_factor=3.0) -chart.save("plot.html") +# Save as PNG and HTML +chart.save(f"plot-{THEME}.png", scale_factor=3.0) +chart.save(f"plot-{THEME}.html") diff --git a/plots/scatter-text/metadata/python/altair.yaml b/plots/scatter-text/metadata/python/altair.yaml index 4f04314db8..42c49ddff0 100644 --- a/plots/scatter-text/metadata/python/altair.yaml +++ b/plots/scatter-text/metadata/python/altair.yaml @@ -1,204 +1,21 @@ +# Per-library metadata for altair implementation of scatter-text +# Auto-generated by impl-generate.yml + library: altair +language: python specification_id: scatter-text created: '2026-01-09T14:24:37Z' -updated: '2026-01-09T14:35:44Z' -generated_by: claude-opus-4-5-20251101 -workflow_run: 20854881873 +updated: '2026-05-17T23:31:08Z' +generated_by: claude-haiku +workflow_run: 26005815739 issue: 3482 -python_version: 3.13.11 -library_version: 6.0.0 -preview_url: https://storage.googleapis.com/anyplot-images/plots/scatter-text/altair/plot.png -preview_html: https://storage.googleapis.com/anyplot-images/plots/scatter-text/altair/plot.html -quality_score: 91 +language_version: 3.13.13 +library_version: 6.1.0 +preview_url_light: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-light.png +preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-dark.png +preview_html_light: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-light.html +preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-dark.html +quality_score: null review: - strengths: - - Excellent use of mark_text for text-based scatter visualization - - 'Good interactive features: hover highlight with color/size change, tooltips with - extra detail' - - Clean, readable layout with appropriate font sizing and spacing - - Viridis colormap provides both visual appeal and colorblind accessibility - - Realistic and engaging dataset (programming languages) - - Proper title format following spec-id · library · pyplots.ai convention - weaknesses: - - The selection_point parameter empty=False is deprecated in newer Altair versions - - Legend position in top-right corner overlaps slightly with data space (minor) - image_description: The plot displays a scatter plot with programming language names - as text labels instead of points. The x-axis shows "Language Age (Years Since - Creation)" ranging from -2 to 74, and the y-axis shows "Relative Popularity Score" - ranging from 0 to 105. Text labels are colored using the viridis colormap based - on popularity (legend on right shows gradient from ~10 purple to ~90 yellow). - Languages like Python (top, yellow), JavaScript, and Java appear with high popularity, - while COBOL, Lisp, and Fortran appear in the bottom right as old but less popular - languages (dark purple/blue). The title correctly reads "scatter-text · altair - · pyplots.ai" at the top. The layout is clean with good spacing between most labels, - a subtle grid, and properly sized text. - criteria_checklist: - visual_quality: - score: 36 - max: 40 - items: - - id: VQ-01 - name: Text Legibility - score: 9 - max: 10 - passed: true - comment: All text labels readable, font is bold and appropriately sized - - id: VQ-02 - name: No Overlap - score: 7 - max: 8 - passed: true - comment: Minimal overlap, most labels well spaced; slight proximity between - some labels like F#/Scala but not overlapping - - id: VQ-03 - name: Element Visibility - score: 8 - max: 8 - passed: true - comment: Text labels are bold and clearly visible throughout - - id: VQ-04 - name: Color Accessibility - score: 5 - max: 5 - passed: true - comment: Viridis colormap is colorblind-safe - - id: VQ-05 - name: Layout Balance - score: 5 - max: 5 - passed: true - comment: Excellent use of canvas space, good margins - - id: VQ-06 - name: Axis Labels - score: 2 - max: 2 - passed: true - comment: Descriptive labels with context (Years Since Creation) - - id: VQ-07 - name: Grid & Legend - score: 0 - max: 2 - passed: false - comment: Grid is subtle (alpha 0.3), but legend is in default position in - top-right corner - spec_compliance: - score: 25 - max: 25 - items: - - id: SC-01 - name: Plot Type - score: 8 - max: 8 - passed: true - comment: Correct scatter-text implementation using mark_text - - id: SC-02 - name: Data Mapping - score: 5 - max: 5 - passed: true - comment: x=age, y=popularity correctly assigned - - id: SC-03 - name: Required Features - score: 5 - max: 5 - passed: true - comment: Text labels at coordinates, color encoding additional info - - id: SC-04 - name: Data Range - score: 3 - max: 3 - passed: true - comment: Axes show all data with appropriate padding - - id: SC-05 - name: Legend Accuracy - score: 2 - max: 2 - passed: true - comment: Legend correctly shows popularity gradient - - id: SC-06 - name: Title Format - score: 2 - max: 2 - passed: true - comment: Uses correct format scatter-text · altair · pyplots.ai - data_quality: - score: 18 - max: 20 - items: - - id: DQ-01 - name: Feature Coverage - score: 7 - max: 8 - passed: true - comment: Shows variation in position and color; could show more clustering/outliers - - id: DQ-02 - name: Realistic Context - score: 7 - max: 7 - passed: true - comment: Programming languages with age vs popularity is a real, comprehensible, - neutral scenario - - id: DQ-03 - name: Appropriate Scale - score: 4 - max: 5 - passed: true - comment: Ages and popularity scores are reasonable; minor quibble that some - popularity rankings seem arbitrary - code_quality: - score: 9 - max: 10 - items: - - id: CQ-01 - name: KISS Structure - score: 3 - max: 3 - passed: true - comment: Imports → data → plot → save structure - - id: CQ-02 - name: Reproducibility - score: 3 - max: 3 - passed: true - comment: np.random.seed(42) is set - - id: CQ-03 - name: Clean Imports - score: 2 - max: 2 - passed: true - comment: Only used imports - - id: CQ-04 - name: No Deprecated API - score: 0 - max: 1 - passed: false - comment: selection_point empty=False is deprecated in Altair 5+ - - id: CQ-05 - name: Output Correct - score: 1 - max: 1 - passed: true - comment: Saves as plot.png and plot.html - library_features: - score: 3 - max: 5 - items: - - id: LF-01 - name: Distinctive Features - score: 3 - max: 5 - passed: true - comment: Uses mark_text, hover selection with nearest=True, tooltips, and - conditional encoding which are Altair strengths; could leverage more layering - verdict: APPROVED -impl_tags: - dependencies: [] - techniques: - - hover-tooltips - - html-export - patterns: - - data-generation - dataprep: [] - styling: - - custom-colormap - - grid-styling + strengths: [] + weaknesses: [] From 4ff579e5fbedf14cfd5e75eaf9d6e35dd62d92da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 17 May 2026 23:34:49 +0000 Subject: [PATCH 2/3] chore(altair): update quality score 86 and review feedback for scatter-text --- .../implementations/python/altair.py | 6 +- .../scatter-text/metadata/python/altair.yaml | 239 +++++++++++++++++- 2 files changed, 235 insertions(+), 10 deletions(-) diff --git a/plots/scatter-text/implementations/python/altair.py b/plots/scatter-text/implementations/python/altair.py index 78b638baf8..66d4bcf316 100644 --- a/plots/scatter-text/implementations/python/altair.py +++ b/plots/scatter-text/implementations/python/altair.py @@ -1,7 +1,7 @@ -"""anyplot.ai +""" anyplot.ai scatter-text: Scatter Plot with Text Labels Instead of Points -Library: altair | Python 3.13 -Quality: pending | Created: 2026-05-17 +Library: altair 6.1.0 | Python 3.13.13 +Quality: 86/100 | Updated: 2026-05-17 """ import os diff --git a/plots/scatter-text/metadata/python/altair.yaml b/plots/scatter-text/metadata/python/altair.yaml index 42c49ddff0..261599a479 100644 --- a/plots/scatter-text/metadata/python/altair.yaml +++ b/plots/scatter-text/metadata/python/altair.yaml @@ -1,11 +1,8 @@ -# Per-library metadata for altair implementation of scatter-text -# Auto-generated by impl-generate.yml - library: altair language: python specification_id: scatter-text created: '2026-01-09T14:24:37Z' -updated: '2026-05-17T23:31:08Z' +updated: '2026-05-17T23:34:49Z' generated_by: claude-haiku workflow_run: 26005815739 issue: 3482 @@ -15,7 +12,235 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/scatter-t preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-dark.png preview_html_light: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-light.html preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-dark.html -quality_score: null +quality_score: 86 review: - strengths: [] - weaknesses: [] + strengths: + - Perfect theme adaptation in both light and dark renders with proper readability + in both color schemes + - All font sizes explicitly set; flawless legibility at high resolution (4800×2700px) + - 'Proper palette compliance: viridis for continuous data, brand green for hover + interaction' + - 'Excellent code quality: clean, reproducible, idiomatic Altair with proper theming + tokens' + - 'Good visual hierarchy: programming languages positioned intuitively by age and + popularity, with high-popularity items visually distinct' + - Effective use of Altair's distinctive hover interactivity via selection_point + and condition + weaknesses: + - 'Design Excellence moderate (10/20): relies on library defaults without extensive + custom aesthetic refinement' + - Minor text clustering in lower-right area (Lisp, Fortran, COBOL) though all remain + readable + - Could enhance data storytelling with strategic visual emphasis or annotations + to highlight key insights + image_description: |- + Light render (plot-light.png): + Background: Warm off-white (#FAF8F1), correctly applied. No pure white. + Chrome: Title in dark text (INK=#1A1A17), axis labels and tick labels in INK_SOFT (#4A4A44). All perfectly readable against light background. + Data: Programming language names positioned at (age, popularity) coordinates, colored by viridis colormap. Python, JavaScript, Java appear in bright yellow-green (high popularity). Older languages like COBOL, Fortran appear in dark purple (low popularity). Colormap provides clear visual separation. + Grid: Subtle gridlines (gridOpacity=0.10) visible but not dominant. + Legend: "Popularity" colorbar on right, showing viridis scale from dark (low) to yellow (high). + Legibility verdict: PASS ✓ - All text readable, no illegible elements, proper contrast. + + Dark render (plot-dark.png): + Background: Warm near-black (#1A1A17), correctly applied. No pure black. + Chrome: Title in light text (INK=#F0EFE8), axis labels and tick labels in INK_SOFT (#B8B7B0). All perfectly readable against dark background. No "dark-on-dark" failures. + Data: Same language names and positions as light render. Viridis colormap colors are identical to light render (confirming proper theme adaptation). Same visual hierarchy: high-popularity in yellow/bright, low-popularity in dark purple. + Grid: Subtle gridlines visible, same opacity as light render. + Legend: Same "Popularity" colorbar with identical viridis scale. + Legibility verdict: PASS ✓ - All text readable, no dark-on-dark issues, proper theme adaptation confirmed. + criteria_checklist: + visual_quality: + score: 29 + max: 30 + items: + - id: VQ-01 + name: Text Legibility + score: 8 + max: 8 + passed: true + comment: All font sizes explicitly set (title=28, labels=22/18, legend=18/16, + marks=14); perfectly readable in both themes + - id: VQ-02 + name: No Overlap + score: 5 + max: 6 + passed: true + comment: Well-distributed 28 labels; minimal clustering in lower-right (Lisp, + Fortran, COBOL) but all readable + - id: VQ-03 + name: Element Visibility + score: 6 + max: 6 + passed: true + comment: Text marks optimally sized (14px); viridis provides clear color differentiation; + all elements visible + - id: VQ-04 + name: Color Accessibility + score: 2 + max: 2 + passed: true + comment: Viridis is CVD-safe perceptually-uniform colormap; good contrast; + brand green on hover + - id: VQ-05 + name: Layout & Canvas + score: 4 + max: 4 + passed: true + comment: 4800×2700px via scale_factor=3; plot fills 65-75% of canvas; balanced + margins; nothing cut off + - id: VQ-06 + name: Axis Labels & Title + score: 2 + max: 2 + passed: true + comment: 'Descriptive labels: ''Language Age (Years Since Creation)'', ''Relative + Popularity Score''; correct title format' + - id: VQ-07 + name: Palette Compliance + score: 2 + max: 2 + passed: true + comment: 'Viridis for continuous data; backgrounds #FAF8F1/#1A1A17 correct; + theme-correct chrome in both renders' + design_excellence: + score: 10 + max: 20 + items: + - id: DE-01 + name: Aesthetic Sophistication + score: 4 + max: 8 + passed: false + comment: Well-configured default with conditional hover color; professional + but relies on library defaults without custom palette + - id: DE-02 + name: Visual Refinement + score: 3 + max: 6 + passed: false + comment: Grid opacity well-tuned (0.10); generous whitespace; some refinement + but minimal customization + - id: DE-03 + name: Data Storytelling + score: 3 + max: 6 + passed: false + comment: 'Good visual hierarchy: high-popularity yellow at top, low-popularity + purple at bottom; viewer sees insight without annotations' + spec_compliance: + score: 15 + max: 15 + items: + - id: SC-01 + name: Plot Type + score: 5 + max: 5 + passed: true + comment: Correct scatter plot with text labels variant + - id: SC-02 + name: Required Features + score: 4 + max: 4 + passed: true + comment: Text labels at x,y; legible (14px bold); interactive hover bonus + - id: SC-03 + name: Data Mapping + score: 3 + max: 3 + passed: true + comment: x=age, y=popularity; scales capture full range [0-68] and [0-100] + - id: SC-04 + name: Title & Legend + score: 3 + max: 3 + passed: true + comment: 'Title: ''scatter-text · Python · altair · anyplot.ai''; Legend: + ''Popularity'' with viridis scale' + data_quality: + score: 15 + max: 15 + items: + - id: DQ-01 + name: Feature Coverage + score: 6 + max: 6 + passed: true + comment: 28 languages spanning ages 4-68 years, popularity 4-98; shows variety + and non-obvious relationships + - id: DQ-02 + name: Realistic Context + score: 5 + max: 5 + passed: true + comment: Real programming languages with plausible ages; neutral, professional + context + - id: DQ-03 + name: Appropriate Scale + score: 4 + max: 4 + passed: true + comment: Factually correct (COBOL ~1960, Rust ~2010); realistic proportions + code_quality: + score: 10 + max: 10 + items: + - id: CQ-01 + name: KISS Structure + score: 3 + max: 3 + passed: true + comment: 'Linear: imports → data → chart → save; no functions/classes' + - id: CQ-02 + name: Reproducibility + score: 2 + max: 2 + passed: true + comment: np.random.seed(42) set; all operations deterministic + - id: CQ-03 + name: Clean Imports + score: 2 + max: 2 + passed: true + comment: os, numpy, pandas, altair all used; no bloat + - id: CQ-04 + name: Code Elegance + score: 2 + max: 2 + passed: true + comment: Clean, readable, appropriate complexity; hover is real Altair interactivity + (not fake) + - id: CQ-05 + name: Output & API + score: 1 + max: 1 + passed: true + comment: Saves as plot-{THEME}.png/html; uses current API + library_mastery: + score: 7 + max: 10 + items: + - id: LM-01 + name: Idiomatic Usage + score: 4 + max: 5 + passed: true + comment: Chart(df).mark_text(), proper encoding, Scale/Legend/Title/properties/configure_* + methods; solid Altair patterns + - id: LM-02 + name: Distinctive Features + score: 3 + max: 5 + passed: false + comment: Uses selection_point() + condition() for hover (distinctive to Altair); + Tooltip() for feedback; features unique to this library + verdict: APPROVED +impl_tags: + dependencies: [] + techniques: + - hover-tooltips + - html-export + patterns: + - data-generation + dataprep: [] + styling: [] From 187dc36f4b9778aa5716cfb78a0fdc83f1bbc9f3 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 17 May 2026 23:40:11 +0000 Subject: [PATCH 3/3] chore(altair): update quality score 87 and review feedback for scatter-text --- .../implementations/python/altair.py | 2 +- .../scatter-text/metadata/python/altair.yaml | 141 ++++++++---------- 2 files changed, 65 insertions(+), 78 deletions(-) diff --git a/plots/scatter-text/implementations/python/altair.py b/plots/scatter-text/implementations/python/altair.py index 66d4bcf316..90ec7dfdec 100644 --- a/plots/scatter-text/implementations/python/altair.py +++ b/plots/scatter-text/implementations/python/altair.py @@ -1,7 +1,7 @@ """ anyplot.ai scatter-text: Scatter Plot with Text Labels Instead of Points Library: altair 6.1.0 | Python 3.13.13 -Quality: 86/100 | Updated: 2026-05-17 +Quality: 87/100 | Updated: 2026-05-17 """ import os diff --git a/plots/scatter-text/metadata/python/altair.yaml b/plots/scatter-text/metadata/python/altair.yaml index 261599a479..192dd6be13 100644 --- a/plots/scatter-text/metadata/python/altair.yaml +++ b/plots/scatter-text/metadata/python/altair.yaml @@ -2,7 +2,7 @@ library: altair language: python specification_id: scatter-text created: '2026-01-09T14:24:37Z' -updated: '2026-05-17T23:34:49Z' +updated: '2026-05-17T23:40:11Z' generated_by: claude-haiku workflow_run: 26005815739 issue: 3482 @@ -12,46 +12,36 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/scatter-t preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-dark.png preview_html_light: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-light.html preview_html_dark: https://storage.googleapis.com/anyplot-images/plots/scatter-text/python/altair/plot-dark.html -quality_score: 86 +quality_score: 87 review: strengths: - - Perfect theme adaptation in both light and dark renders with proper readability - in both color schemes - - All font sizes explicitly set; flawless legibility at high resolution (4800×2700px) - - 'Proper palette compliance: viridis for continuous data, brand green for hover - interaction' - - 'Excellent code quality: clean, reproducible, idiomatic Altair with proper theming - tokens' - - 'Good visual hierarchy: programming languages positioned intuitively by age and - popularity, with high-popularity items visually distinct' - - Effective use of Altair's distinctive hover interactivity via selection_point - and condition + - Perfect visual quality across both light and dark themes with zero legibility + failures + - Excellent theme-adaptive chrome implementation with correct token mapping + - Clean, idiomatic altair code using conditional encoding and selections + - Realistic, neutral data demonstrating the scatter-text plot type effectively + - All specification requirements met with polished execution weaknesses: - - 'Design Excellence moderate (10/20): relies on library defaults without extensive - custom aesthetic refinement' - - Minor text clustering in lower-right area (Lisp, Fortran, COBOL) though all remain - readable - - Could enhance data storytelling with strategic visual emphasis or annotations - to highlight key insights + - 'Design Excellence moderate: lacks distinctive aesthetic touches or custom styling + beyond configured defaults' + - 'Visual storytelling minimal: no visual hierarchy or emphasis to guide interpretation' + - 'Library Mastery: doesn''t leverage advanced altair features like transforms or + custom interaction patterns' image_description: |- Light render (plot-light.png): - Background: Warm off-white (#FAF8F1), correctly applied. No pure white. - Chrome: Title in dark text (INK=#1A1A17), axis labels and tick labels in INK_SOFT (#4A4A44). All perfectly readable against light background. - Data: Programming language names positioned at (age, popularity) coordinates, colored by viridis colormap. Python, JavaScript, Java appear in bright yellow-green (high popularity). Older languages like COBOL, Fortran appear in dark purple (low popularity). Colormap provides clear visual separation. - Grid: Subtle gridlines (gridOpacity=0.10) visible but not dominant. - Legend: "Popularity" colorbar on right, showing viridis scale from dark (low) to yellow (high). - Legibility verdict: PASS ✓ - All text readable, no illegible elements, proper contrast. + Background: Warm off-white (#FAF8F1) - correct page surface tone + Chrome: Title "scatter-text · Python · altair · anyplot.ai" centered and readable; axis labels "Language Age (Years Since Creation)" and "Relative Popularity Score" descriptive with units; tick labels and legend all readable in dark text + Data: 28 programming language names positioned by age and popularity; colors follow viridis colormap (purple for low ~4, yellow for high ~98); bold text clearly distinguishable from background + Legibility verdict: PASS - all elements readable, good contrast, no dark-on-light issues Dark render (plot-dark.png): - Background: Warm near-black (#1A1A17), correctly applied. No pure black. - Chrome: Title in light text (INK=#F0EFE8), axis labels and tick labels in INK_SOFT (#B8B7B0). All perfectly readable against dark background. No "dark-on-dark" failures. - Data: Same language names and positions as light render. Viridis colormap colors are identical to light render (confirming proper theme adaptation). Same visual hierarchy: high-popularity in yellow/bright, low-popularity in dark purple. - Grid: Subtle gridlines visible, same opacity as light render. - Legend: Same "Popularity" colorbar with identical viridis scale. - Legibility verdict: PASS ✓ - All text readable, no dark-on-dark issues, proper theme adaptation confirmed. + Background: Warm near-black (#1A1A17) - correct dark page surface tone + Chrome: Title, axis labels, tick labels all readable in light text colors (#F0EFE8 primary, #B8B7B0 secondary); no dark-on-dark failures; sufficient contrast against dark background + Data: Viridis colormap identical to light render (same purple-to-yellow gradient showing popularity distribution); only chrome adapted to theme; colors unchanged confirming proper theme handling + Legibility verdict: PASS - all text readable with proper light-on-dark contrast, no accessibility issues criteria_checklist: visual_quality: - score: 29 + score: 30 max: 30 items: - id: VQ-01 @@ -59,52 +49,48 @@ review: score: 8 max: 8 passed: true - comment: All font sizes explicitly set (title=28, labels=22/18, legend=18/16, - marks=14); perfectly readable in both themes + comment: Font sizes explicitly set; all text readable in both light and dark + themes - id: VQ-02 name: No Overlap - score: 5 + score: 6 max: 6 passed: true - comment: Well-distributed 28 labels; minimal clustering in lower-right (Lisp, - Fortran, COBOL) but all readable + comment: Text labels well-distributed across plot; no overlapping elements - id: VQ-03 name: Element Visibility score: 6 max: 6 passed: true - comment: Text marks optimally sized (14px); viridis provides clear color differentiation; - all elements visible + comment: Labels appropriately sized for 4800×2700px canvas; fully visible - id: VQ-04 name: Color Accessibility score: 2 max: 2 passed: true - comment: Viridis is CVD-safe perceptually-uniform colormap; good contrast; - brand green on hover + comment: 'Viridis is perceptually uniform; hover uses brand green #009E73' - id: VQ-05 name: Layout & Canvas score: 4 max: 4 passed: true - comment: 4800×2700px via scale_factor=3; plot fills 65-75% of canvas; balanced - margins; nothing cut off + comment: Excellent canvas utilization with balanced margins and legend placement - id: VQ-06 name: Axis Labels & Title score: 2 max: 2 passed: true - comment: 'Descriptive labels: ''Language Age (Years Since Creation)'', ''Relative - Popularity Score''; correct title format' + comment: 'Descriptive labels with units: ''Language Age (Years Since Creation)'', + ''Relative Popularity Score''' - id: VQ-07 name: Palette Compliance score: 2 max: 2 passed: true - comment: 'Viridis for continuous data; backgrounds #FAF8F1/#1A1A17 correct; - theme-correct chrome in both renders' + comment: 'Viridis for continuous data; backgrounds #FAF8F1 (light) / #1A1A17 + (dark); text colors theme-adaptive; data colors identical across renders' design_excellence: - score: 10 + score: 9 max: 20 items: - id: DE-01 @@ -112,22 +98,22 @@ review: score: 4 max: 8 passed: false - comment: Well-configured default with conditional hover color; professional - but relies on library defaults without custom palette + comment: Well-configured defaults with thoughtful viridis use; intentional + data choice; lacks distinctive custom styling—reads as library defaults - id: DE-02 name: Visual Refinement score: 3 max: 6 passed: false - comment: Grid opacity well-tuned (0.10); generous whitespace; some refinement - but minimal customization + comment: Theme-aware colors and grid opacity configured; some refinement but + mostly library patterns - id: DE-03 name: Data Storytelling - score: 3 + score: 2 max: 6 passed: false - comment: 'Good visual hierarchy: high-popularity yellow at top, low-popularity - purple at bottom; viewer sees insight without annotations' + comment: Data displayed but no visual hierarchy, focal point, or narrative + emphasis spec_compliance: score: 15 max: 15 @@ -137,26 +123,26 @@ review: score: 5 max: 5 passed: true - comment: Correct scatter plot with text labels variant + comment: Correct scatter plot with text labels per specification - id: SC-02 name: Required Features score: 4 max: 4 passed: true - comment: Text labels at x,y; legible (14px bold); interactive hover bonus + comment: 'All features implemented: text labels at coordinates, legend, hover + interaction, tooltips' - id: SC-03 name: Data Mapping score: 3 max: 3 passed: true - comment: x=age, y=popularity; scales capture full range [0-68] and [0-100] + comment: X = language age, Y = popularity; axes correctly show all data - id: SC-04 name: Title & Legend score: 3 max: 3 passed: true - comment: 'Title: ''scatter-text · Python · altair · anyplot.ai''; Legend: - ''Popularity'' with viridis scale' + comment: Title format correct; legend properly labeled as 'Popularity' data_quality: score: 15 max: 15 @@ -166,21 +152,22 @@ review: score: 6 max: 6 passed: true - comment: 28 languages spanning ages 4-68 years, popularity 4-98; shows variety - and non-obvious relationships + comment: 28 languages with varied ages (4-68 years) and popularities (4-98) + demonstrate full feature coverage - id: DQ-02 name: Realistic Context score: 5 max: 5 passed: true - comment: Real programming languages with plausible ages; neutral, professional - context + comment: Programming languages by age and popularity is a real, neutral, comprehensible + scenario - id: DQ-03 name: Appropriate Scale score: 4 max: 4 passed: true - comment: Factually correct (COBOL ~1960, Rust ~2010); realistic proportions + comment: Language ages and popularities align with actual programming language + history code_quality: score: 10 max: 10 @@ -190,50 +177,50 @@ review: score: 3 max: 3 passed: true - comment: 'Linear: imports → data → chart → save; no functions/classes' + comment: 'Simple linear structure: imports → data → plot → save' - id: CQ-02 name: Reproducibility score: 2 max: 2 passed: true - comment: np.random.seed(42) set; all operations deterministic + comment: Deterministic with np.random.seed(42) - id: CQ-03 name: Clean Imports score: 2 max: 2 passed: true - comment: os, numpy, pandas, altair all used; no bloat + comment: Only used imports present - id: CQ-04 name: Code Elegance score: 2 max: 2 passed: true - comment: Clean, readable, appropriate complexity; hover is real Altair interactivity - (not fake) + comment: Clean Pythonic code; conditional encoding with condition() is elegant; + selection_point() for hover is appropriate - id: CQ-05 name: Output & API score: 1 max: 1 passed: true - comment: Saves as plot-{THEME}.png/html; uses current API + comment: Correctly saves as plot-{THEME}.png and plot-{THEME}.html library_mastery: - score: 7 + score: 8 max: 10 items: - id: LM-01 name: Idiomatic Usage - score: 4 + score: 5 max: 5 passed: true - comment: Chart(df).mark_text(), proper encoding, Scale/Legend/Title/properties/configure_* - methods; solid Altair patterns + comment: Expert use of altair's high-level API with proper encoding, conditional + expressions, and selection patterns - id: LM-02 name: Distinctive Features score: 3 max: 5 passed: false - comment: Uses selection_point() + condition() for hover (distinctive to Altair); - Tooltip() for feedback; features unique to this library + comment: Uses conditional encoding and hover selections effectively; doesn't + leverage advanced features like transforms or custom properties verdict: APPROVED impl_tags: dependencies: []