From 5dac97ae66fefc7a0a0f80787ee25f29ba00bc02 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 9 May 2026 07:01:03 +0000 Subject: [PATCH 1/3] chore(seaborn): add metadata for bar-stacked --- .../implementations/python/seaborn.py | 87 ++++--- .../bar-stacked/metadata/python/seaborn.yaml | 217 ++---------------- 2 files changed, 72 insertions(+), 232 deletions(-) diff --git a/plots/bar-stacked/implementations/python/seaborn.py b/plots/bar-stacked/implementations/python/seaborn.py index 44f46946ca..7b4b7733af 100644 --- a/plots/bar-stacked/implementations/python/seaborn.py +++ b/plots/bar-stacked/implementations/python/seaborn.py @@ -1,19 +1,32 @@ -""" pyplots.ai +"""anyplot.ai bar-stacked: Stacked Bar Chart Library: seaborn 0.13.2 | Python 3.13.11 -Quality: 91/100 | Created: 2025-12-26 +Quality: 91 | Updated: 2025-05-09 """ +import os + import matplotlib.pyplot as plt +import numpy as np import pandas as pd import seaborn as sns -# Data - Monthly sales by product category (realistic business scenario) +# 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" + +# Okabe-Ito palette (first series always #009E73) +OKABE_ITO = ["#009E73", "#D55E00", "#0072B2", "#CC79A7"] + +# Data - Monthly sales by product category +np.random.seed(42) categories = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"] products = ["Electronics", "Clothing", "Home & Garden", "Sports"] -# Create realistic sales data (in thousands) data = { "Month": categories * len(products), "Product": [p for p in products for _ in categories], @@ -58,24 +71,32 @@ ordered_products = product_totals.index.tolist() df["Product"] = pd.Categorical(df["Product"], categories=ordered_products, ordered=True) -# Create plot with seaborn styling -sns.set_style("whitegrid") +# Set theme and styling +sns.set_theme( + style="ticks", + rc={ + "figure.facecolor": PAGE_BG, + "axes.facecolor": PAGE_BG, + "axes.edgecolor": INK_SOFT, + "axes.labelcolor": INK, + "text.color": INK, + "xtick.color": INK_SOFT, + "ytick.color": INK_SOFT, + "grid.color": INK, + "grid.alpha": 0.10, + "legend.facecolor": ELEVATED_BG, + "legend.edgecolor": INK_SOFT, + }, +) sns.set_context("talk", font_scale=1.2) -fig, ax = plt.subplots(figsize=(16, 9)) +fig, ax = plt.subplots(figsize=(16, 9), facecolor=PAGE_BG) -# Python-themed color palette with distinct colors (avoiding similar yellows) -# Map colors to original product order, then reorder based on totals -original_colors = { - "Electronics": "#306998", # Python Blue - "Clothing": "#FFD43B", # Python Yellow - "Home & Garden": "#4B8BBE", # Light Blue - "Sports": "#E57373", # Coral/Salmon for contrast -} -colors = [original_colors[p] for p in ordered_products] +# Create color map for products +product_colors = {p: OKABE_ITO[i] for i, p in enumerate(ordered_products)} +colors = [product_colors[p] for p in ordered_products] -# Use seaborn's histplot with weights for stacked bar chart -# This is seaborn's native approach for stacked categorical bars +# Plot stacked bar chart using histplot sns.histplot( data=df, x="Month", @@ -84,7 +105,7 @@ multiple="stack", palette=colors, shrink=0.7, - edgecolor="white", + edgecolor=PAGE_BG, linewidth=1.5, ax=ax, ) @@ -92,34 +113,40 @@ # Calculate totals for labels on top of stacks totals = df.groupby("Month", observed=True)["Sales"].sum() for i, (_month, total) in enumerate(totals.items()): - ax.text(i, total + 8, f"${int(total)}K", ha="center", va="bottom", fontsize=16, fontweight="bold") + ax.text(i, total + 8, f"${int(total)}K", ha="center", va="bottom", fontsize=16, fontweight="bold", color=INK) # Styling -ax.set_xlabel("Month", fontsize=20) -ax.set_ylabel("Sales (Thousands $)", fontsize=20) -ax.set_title("bar-stacked · seaborn · pyplots.ai", fontsize=24, fontweight="bold") -ax.tick_params(axis="both", labelsize=16) +ax.set_xlabel("Month", fontsize=20, color=INK) +ax.set_ylabel("Sales (Thousands $)", fontsize=20, color=INK) +ax.set_title("bar-stacked · seaborn · anyplot.ai", fontsize=24, fontweight="bold", color=INK) +ax.tick_params(axis="both", labelsize=16, colors=INK_SOFT) -# Legend - move to right and adjust styling +# Legend legend = ax.get_legend() legend.set_title("Product Category") legend.get_title().set_fontsize(18) +legend.get_title().set_color(INK) for text in legend.get_texts(): text.set_fontsize(16) + text.set_color(INK) legend.set_bbox_to_anchor((1.02, 1)) legend.set_loc("upper left") -legend.get_frame().set_edgecolor("gray") +legend.get_frame().set_facecolor(ELEVATED_BG) +legend.get_frame().set_edgecolor(INK_SOFT) # Grid styling -ax.yaxis.grid(True, alpha=0.3, linestyle="--") +ax.yaxis.grid(True, alpha=0.10, linewidth=0.8) ax.xaxis.grid(False) ax.set_axisbelow(True) -# Remove top and right spines -sns.despine() +# Spine styling +for spine in ["top", "right"]: + ax.spines[spine].set_visible(False) +for spine in ["left", "bottom"]: + ax.spines[spine].set_color(INK_SOFT) # Adjust y-axis to accommodate total labels ax.set_ylim(0, totals.max() * 1.15) plt.tight_layout() -plt.savefig("plot.png", dpi=300, bbox_inches="tight") +plt.savefig(f"plot-{THEME}.png", dpi=300, bbox_inches="tight", facecolor=PAGE_BG) diff --git a/plots/bar-stacked/metadata/python/seaborn.yaml b/plots/bar-stacked/metadata/python/seaborn.yaml index 63d9c93ae2..7b4db6ca1d 100644 --- a/plots/bar-stacked/metadata/python/seaborn.yaml +++ b/plots/bar-stacked/metadata/python/seaborn.yaml @@ -1,208 +1,21 @@ +# Per-library metadata for seaborn implementation of bar-stacked +# Auto-generated by impl-generate.yml + library: seaborn +language: python specification_id: bar-stacked created: '2025-12-26T10:05:04Z' -updated: '2025-12-26T10:08:42Z' -generated_by: claude-opus-4-5-20251101 -workflow_run: 20520476822 +updated: '2026-05-09T07:01:02Z' +generated_by: claude-haiku +workflow_run: 25594692212 issue: 1947 -python_version: 3.13.11 +python_version: 3.13.13 library_version: 0.13.2 -preview_url: https://storage.googleapis.com/anyplot-images/plots/bar-stacked/seaborn/plot.png -preview_html: null -quality_score: 91 -impl_tags: - dependencies: [] - techniques: - - annotations - patterns: - - groupby-aggregation - - explicit-figure - dataprep: [] - styling: - - edge-highlighting - - grid-styling +preview_url_light: https://storage.googleapis.com/anyplot-images/plots/bar-stacked/python/seaborn/plot-light.png +preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/bar-stacked/python/seaborn/plot-dark.png +preview_html_light: null +preview_html_dark: null +quality_score: null review: - strengths: - - Excellent visual design with clear color differentiation and white edge lines - separating segments - - Total value labels above each stack enhance readability and match spec recommendation - - Proper ordering of products by total sales (largest at bottom) as recommended - in spec - - Clean use of seaborn styling (whitegrid, despine, context scaling) - - Realistic business data scenario with meaningful seasonal variations - weaknesses: - - No explicit random seed set (data is deterministic but good practice to include - np.random.seed(42) for consistency) - - 'Two blue shades (Electronics #306998 and Home & Garden #4B8BBE) may be difficult - to distinguish for some colorblind users' - image_description: 'The plot shows a stacked bar chart displaying monthly sales - data (January through June) for four product categories: Electronics (dark blue), - Clothing (yellow), Home & Garden (light blue), and Sports (coral/salmon). Each - bar is properly stacked with total values labeled above ($285K to $435K). The - title follows the required format "bar-stacked · seaborn · pyplots.ai". The y-axis - shows "Sales (Thousands $)" ranging from 0 to 500, and the x-axis shows "Month". - A legend titled "Product Category" is positioned to the right of the plot. The - grid is subtle with horizontal dashed lines, and the overall layout is clean with - good spacing between bars.' - criteria_checklist: - visual_quality: - score: 36 - max: 40 - items: - - id: VQ-01 - name: Text Legibility - score: 10 - max: 10 - passed: true - comment: Title at 24pt, labels at 20pt, ticks at 16pt - all perfectly readable - - id: VQ-02 - name: No Overlap - score: 8 - max: 8 - passed: true - comment: No overlapping text elements, all labels clear - - id: VQ-03 - name: Element Visibility - score: 8 - max: 8 - passed: true - comment: Bar segments well-sized with white edge lines for separation - - id: VQ-04 - name: Color Accessibility - score: 4 - max: 5 - passed: true - comment: Colors are distinct (blue, yellow, light blue, coral) but two blue - shades could be challenging for some colorblind users - - id: VQ-05 - name: Layout Balance - score: 5 - max: 5 - passed: true - comment: Good proportions, plot fills canvas appropriately, legend well-positioned - - id: VQ-06 - name: Axis Labels - score: 1 - max: 2 - passed: true - comment: Y-axis has units "Sales (Thousands $)", X-axis just "Month" (acceptable - but could be more descriptive) - - id: VQ-07 - name: Grid & Legend - score: 0 - max: 2 - passed: true - comment: Grid is subtle (alpha=0.3, dashed), but legend appears to overlap - with the rightmost bar edge slightly - spec_compliance: - score: 25 - max: 25 - items: - - id: SC-01 - name: Plot Type - score: 8 - max: 8 - passed: true - comment: Correct stacked bar chart - - id: SC-02 - name: Data Mapping - score: 5 - max: 5 - passed: true - comment: Categories on X, values stacked correctly - - id: SC-03 - name: Required Features - score: 5 - max: 5 - passed: true - comment: Stacked components, total labels, legend, consistent ordering - - id: SC-04 - name: Data Range - score: 3 - max: 3 - passed: true - comment: All data visible, y-axis extends to accommodate totals - - id: SC-05 - name: Legend Accuracy - score: 2 - max: 2 - passed: true - comment: Legend labels match product categories correctly - - id: SC-06 - name: Title Format - score: 2 - max: 2 - passed: true - comment: 'Uses correct format: bar-stacked · seaborn · pyplots.ai' - data_quality: - score: 20 - max: 20 - items: - - id: DQ-01 - name: Feature Coverage - score: 8 - max: 8 - passed: true - comment: Shows variation across months, different growth patterns per category, - part-to-whole relationships clear - - id: DQ-02 - name: Realistic Context - score: 7 - max: 7 - passed: true - comment: Monthly sales by product category is a real business scenario - - id: DQ-03 - name: Appropriate Scale - score: 5 - max: 5 - passed: true - comment: Sales values in thousands are realistic for retail business - code_quality: - score: 7 - max: 10 - items: - - id: CQ-01 - name: KISS Structure - score: 3 - max: 3 - passed: true - comment: 'Linear structure: imports → data → plot → save' - - id: CQ-02 - name: Reproducibility - score: 0 - max: 3 - passed: false - comment: No random seed set (data is deterministic, but best practice to include - seed for any random operations) - - id: CQ-03 - name: Clean Imports - score: 2 - max: 2 - passed: true - comment: Only matplotlib, pandas, seaborn imported and all used - - id: CQ-04 - name: No Deprecated API - score: 1 - max: 1 - passed: true - comment: Uses current seaborn API - - id: CQ-05 - name: Output Correct - score: 1 - max: 1 - passed: true - comment: Saves as plot.png - library_features: - score: 3 - max: 5 - items: - - id: LF-01 - name: Uses distinctive library features - score: 3 - max: 5 - passed: true - comment: Uses sns.histplot with weights/multiple="stack" which is seaborn's - approach, plus sns.set_style, sns.set_context, and sns.despine. However, - seaborn doesn't have a native stacked bar function, so using histplot with - weights is a workaround rather than a distinctive strength. - verdict: APPROVED + strengths: [] + weaknesses: [] From 90f5a0f50e8520c94c7e2351f6d355b62cdc29aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 9 May 2026 07:03:47 +0000 Subject: [PATCH 2/3] chore(seaborn): update quality score 89 and review feedback for bar-stacked --- .../implementations/python/seaborn.py | 6 +- .../bar-stacked/metadata/python/seaborn.yaml | 219 +++++++++++++++++- 2 files changed, 215 insertions(+), 10 deletions(-) diff --git a/plots/bar-stacked/implementations/python/seaborn.py b/plots/bar-stacked/implementations/python/seaborn.py index 7b4b7733af..93ff5c4f84 100644 --- a/plots/bar-stacked/implementations/python/seaborn.py +++ b/plots/bar-stacked/implementations/python/seaborn.py @@ -1,7 +1,7 @@ -"""anyplot.ai +""" anyplot.ai bar-stacked: Stacked Bar Chart -Library: seaborn 0.13.2 | Python 3.13.11 -Quality: 91 | Updated: 2025-05-09 +Library: seaborn 0.13.2 | Python 3.13.13 +Quality: 89/100 | Updated: 2026-05-09 """ import os diff --git a/plots/bar-stacked/metadata/python/seaborn.yaml b/plots/bar-stacked/metadata/python/seaborn.yaml index 7b4db6ca1d..43f855bf5a 100644 --- a/plots/bar-stacked/metadata/python/seaborn.yaml +++ b/plots/bar-stacked/metadata/python/seaborn.yaml @@ -1,11 +1,8 @@ -# Per-library metadata for seaborn implementation of bar-stacked -# Auto-generated by impl-generate.yml - library: seaborn language: python specification_id: bar-stacked created: '2025-12-26T10:05:04Z' -updated: '2026-05-09T07:01:02Z' +updated: '2026-05-09T07:03:47Z' generated_by: claude-haiku workflow_run: 25594692212 issue: 1947 @@ -15,7 +12,215 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/bar-stack preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/bar-stacked/python/seaborn/plot-dark.png preview_html_light: null preview_html_dark: null -quality_score: null +quality_score: 89 review: - strengths: [] - weaknesses: [] + strengths: + - Excellent theme adaptation with proper light/dark text and background colors + - Clean, professional styling with correct Okabe-Ito palette compliance + - Well-positioned total value labels that enhance readability + - Proper handling of categorical data ordering by total sales + - Reproducible code with explicit seed; readable at full resolution + - All text legible in both light and dark renders + weaknesses: + - Design excellence is solid but standard—fairly typical seaborn styling without + distinctive visual enhancements + - Could leverage more sophisticated seaborn patterns or custom styling techniques + - Could emphasize seasonal trends or composition insights more through visual hierarchy + image_description: |- + Light render (plot-light.png): + Background: Warm off-white (#FAF8F1) as specified + Chrome: Title "bar-stacked · seaborn · anyplot.ai" in dark bold text, x-label "Month", y-label "Sales (Thousands $)" all clearly readable in dark ink colors (#1A1A17). Tick labels for months and sales values in soft ink (#4A4A44) are readable. Subtle y-axis gridlines visible at 10% alpha. + Data: Stacked bars with Okabe-Ito colors—#009E73 (Electronics/green at base), #D55E00 (Clothing/orange), #0072B2 (Home & Garden/blue), #CC79A7 (Sports/pink at top). All segments clearly distinguishable. Total labels ($285K–$435K) in bold dark text above each bar, fully legible. Legend positioned right with light background. + Legibility verdict: PASS + + Dark render (plot-dark.png): + Background: Warm near-black (#1A1A17) as specified + Chrome: Title and axis labels rendered in light off-white (#F0EFE8), clearly readable against dark background. Tick labels in soft light (#B8B7B0) remain visible. Y-axis grid lines subtle but present. No dark-on-dark failures detected. + Data: Data colors IDENTICAL to light render (#009E73, #D55E00, #0072B2, #CC79A7)—only chrome/background adapted. Total labels in light text above bars, fully legible. Legend styled identically with light text on elevated dark background. + Legibility verdict: PASS + criteria_checklist: + visual_quality: + score: 30 + max: 30 + items: + - id: VQ-01 + name: Text Legibility + score: 8 + max: 8 + passed: true + comment: All text sizes explicitly set and readable in both themes + - id: VQ-02 + name: No Overlap + score: 6 + max: 6 + passed: true + comment: No text collisions; total labels properly positioned + - id: VQ-03 + name: Element Visibility + score: 6 + max: 6 + passed: true + comment: Bars well-defined with edges; all segments distinguishable + - id: VQ-04 + name: Color Accessibility + score: 2 + max: 2 + passed: true + comment: Okabe-Ito palette; colorblind-safe; good contrast throughout + - id: VQ-05 + name: Layout & Canvas + score: 4 + max: 4 + passed: true + comment: 16:9 proportions with generous whitespace; nothing cut off + - id: VQ-06 + name: Axis Labels & Title + score: 2 + max: 2 + passed: true + comment: Proper format with descriptive labels and units + - id: VQ-07 + name: Palette Compliance + score: 2 + max: 2 + passed: true + comment: 'First series #009E73; Okabe-Ito order; theme-correct backgrounds; + both renders adapted' + design_excellence: + score: 13 + max: 20 + items: + - id: DE-01 + name: Aesthetic Sophistication + score: 5 + max: 8 + passed: true + comment: Intentional Okabe-Ito usage; professional but fairly standard seaborn + styling + - id: DE-02 + name: Visual Refinement + score: 4 + max: 6 + passed: true + comment: Spines removed; subtle grid; generous whitespace; custom legend styling + - id: DE-03 + name: Data Storytelling + score: 4 + max: 6 + passed: true + comment: Total labels create hierarchy; seasonal patterns visible; could emphasize + further + spec_compliance: + score: 15 + max: 15 + items: + - id: SC-01 + name: Plot Type + score: 5 + max: 5 + passed: true + comment: Correct stacked bar implementation + - id: SC-02 + name: Required Features + score: 4 + max: 4 + passed: true + comment: 'All features present: categories, components, values, totals' + - id: SC-03 + name: Data Mapping + score: 3 + max: 3 + passed: true + comment: Correct axis mapping; full data range visible + - id: SC-04 + name: Title & Legend + score: 3 + max: 3 + passed: true + comment: Correct title format; legend complete and descriptive + data_quality: + score: 15 + max: 15 + items: + - id: DQ-01 + name: Feature Coverage + score: 6 + max: 6 + passed: true + comment: All stacked bar aspects demonstrated + - id: DQ-02 + name: Realistic Context + score: 5 + max: 5 + passed: true + comment: Plausible sales data with realistic seasonal patterns + - id: DQ-03 + name: Appropriate Scale + score: 4 + max: 4 + passed: true + comment: Sensible thousands scale and value range + code_quality: + score: 10 + max: 10 + items: + - id: CQ-01 + name: KISS Structure + score: 3 + max: 3 + passed: true + comment: Straightforward imperative script; no functions/classes + - id: CQ-02 + name: Reproducibility + score: 2 + max: 2 + passed: true + comment: Deterministic with np.random.seed(42) + - id: CQ-03 + name: Clean Imports + score: 2 + max: 2 + passed: true + comment: Only necessary imports used + - id: CQ-04 + name: Code Elegance + score: 2 + max: 2 + passed: true + comment: Appropriate complexity; no fake UI + - id: CQ-05 + name: Output & API + score: 1 + max: 1 + passed: true + comment: Saves as plot-{THEME}.png with current API + library_mastery: + score: 6 + max: 10 + items: + - id: LM-01 + name: Idiomatic Usage + score: 4 + max: 5 + passed: true + comment: sns.histplot with weights; sns.set_theme; axes-level API used idiomatically + - id: LM-02 + name: Distinctive Features + score: 2 + max: 5 + passed: true + comment: Standard seaborn patterns; could use more advanced techniques + verdict: APPROVED +impl_tags: + dependencies: [] + techniques: + - annotations + - custom-legend + patterns: + - data-generation + - groupby-aggregation + - iteration-over-groups + dataprep: [] + styling: + - publication-ready + - grid-styling From 2e0379ef2932652a9d5be5d656dc31f44b474bd5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 9 May 2026 07:10:56 +0000 Subject: [PATCH 3/3] chore(seaborn): update quality score 84 and review feedback for bar-stacked --- .../implementations/python/seaborn.py | 2 +- .../bar-stacked/metadata/python/seaborn.yaml | 141 ++++++++++-------- 2 files changed, 81 insertions(+), 62 deletions(-) diff --git a/plots/bar-stacked/implementations/python/seaborn.py b/plots/bar-stacked/implementations/python/seaborn.py index 93ff5c4f84..acabc21d63 100644 --- a/plots/bar-stacked/implementations/python/seaborn.py +++ b/plots/bar-stacked/implementations/python/seaborn.py @@ -1,7 +1,7 @@ """ anyplot.ai bar-stacked: Stacked Bar Chart Library: seaborn 0.13.2 | Python 3.13.13 -Quality: 89/100 | Updated: 2026-05-09 +Quality: 84/100 | Updated: 2026-05-09 """ import os diff --git a/plots/bar-stacked/metadata/python/seaborn.yaml b/plots/bar-stacked/metadata/python/seaborn.yaml index 43f855bf5a..8f747e2465 100644 --- a/plots/bar-stacked/metadata/python/seaborn.yaml +++ b/plots/bar-stacked/metadata/python/seaborn.yaml @@ -2,7 +2,7 @@ library: seaborn language: python specification_id: bar-stacked created: '2025-12-26T10:05:04Z' -updated: '2026-05-09T07:03:47Z' +updated: '2026-05-09T07:10:55Z' generated_by: claude-haiku workflow_run: 25594692212 issue: 1947 @@ -12,32 +12,39 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/bar-stack preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/bar-stacked/python/seaborn/plot-dark.png preview_html_light: null preview_html_dark: null -quality_score: 89 +quality_score: 84 review: strengths: - - Excellent theme adaptation with proper light/dark text and background colors - - Clean, professional styling with correct Okabe-Ito palette compliance - - Well-positioned total value labels that enhance readability - - Proper handling of categorical data ordering by total sales - - Reproducible code with explicit seed; readable at full resolution - - All text legible in both light and dark renders + - 'Perfect visual quality: all text explicitly sized and readable in both light + and dark themes' + - 'Perfect spec compliance: correct stacked bar chart with all required features' + - 'Perfect code quality: clean KISS structure, reproducible with seed, all imports + used' + - 'Perfect data quality: realistic business scenario demonstrating growth, seasonality, + and composition shifts' + - 'Excellent theme implementation: both renders theme-correct with data colors identical + across light/dark' + - 'Well-configured design: spine removal, subtle grid, legend styling show refinement + beyond defaults' weaknesses: - - Design excellence is solid but standard—fairly typical seaborn styling without - distinctive visual enhancements - - Could leverage more sophisticated seaborn patterns or custom styling techniques - - Could emphasize seasonal trends or composition insights more through visual hierarchy + - 'LM-01: sns.histplot() with categorical stacking is unconventional—a workaround + for a distribution function. More idiomatic: use sns.barplot() with pivoted data + or pandas.DataFrame.plot(stacked=True).' + - 'DE-03: Data storytelling is implicit in data choice (growth, seasonality) but + not visually emphasized. Viewer must extract insights rather than being guided. + Consider visual emphasis or annotation.' image_description: |- Light render (plot-light.png): - Background: Warm off-white (#FAF8F1) as specified - Chrome: Title "bar-stacked · seaborn · anyplot.ai" in dark bold text, x-label "Month", y-label "Sales (Thousands $)" all clearly readable in dark ink colors (#1A1A17). Tick labels for months and sales values in soft ink (#4A4A44) are readable. Subtle y-axis gridlines visible at 10% alpha. - Data: Stacked bars with Okabe-Ito colors—#009E73 (Electronics/green at base), #D55E00 (Clothing/orange), #0072B2 (Home & Garden/blue), #CC79A7 (Sports/pink at top). All segments clearly distinguishable. Total labels ($285K–$435K) in bold dark text above each bar, fully legible. Legend positioned right with light background. - Legibility verdict: PASS + Background: Warm off-white (#FAF8F1) ✓ + Chrome: Title "bar-stacked · seaborn · anyplot.ai" (fontsize 24, bold, dark), axis labels (fontsize 20, dark), tick labels (fontsize 16, gray #4A4A44), all fully readable with excellent contrast. + Data: Stacked bar chart with four Okabe-Ito colors (#009E73 Electronics, #D55E00 Clothing, #0072B2 Home & Garden, #CC79A7 Sports). Total value labels ($285K–$435K) above each bar in bold dark text, clearly legible. Legend positioned right with "Product Category" title. Subtle y-axis grid (alpha=0.10). All segments clearly distinguished by color and white edges. + Legibility verdict: PASS ✓ (all text readable, no overlap, excellent contrast) Dark render (plot-dark.png): - Background: Warm near-black (#1A1A17) as specified - Chrome: Title and axis labels rendered in light off-white (#F0EFE8), clearly readable against dark background. Tick labels in soft light (#B8B7B0) remain visible. Y-axis grid lines subtle but present. No dark-on-dark failures detected. - Data: Data colors IDENTICAL to light render (#009E73, #D55E00, #0072B2, #CC79A7)—only chrome/background adapted. Total labels in light text above bars, fully legible. Legend styled identically with light text on elevated dark background. - Legibility verdict: PASS + Background: Warm near-black (#1A1A17) ✓ + Chrome: Title, axis labels, tick labels all rendered in light text (#F0EFE8 primary, #B8B7B0 secondary). Legend box dark (#242420) with light text. All text fully readable with excellent contrast against dark background. No dark-on-dark failures. Grid visible in light rgba(240,239,232,0.10). + Data: Identical data colors to light render (#009E73, #D55E00, #0072B2, #CC79A7). Total value labels clearly visible in light text. All bar segments distinguishable. + Legibility verdict: PASS ✓ (all text readable, perfect theme adaptation, data colors identical to light render) criteria_checklist: visual_quality: score: 30 @@ -48,68 +55,75 @@ review: score: 8 max: 8 passed: true - comment: All text sizes explicitly set and readable in both themes + comment: 'All font sizes explicitly set: Title 24pt, Labels 20pt, Ticks 16pt. + Perfect readability in both themes.' - id: VQ-02 name: No Overlap score: 6 max: 6 passed: true - comment: No text collisions; total labels properly positioned + comment: All text fully readable. X-axis labels evenly spaced, legend outside + plot, total labels positioned clearly. - id: VQ-03 name: Element Visibility score: 6 max: 6 passed: true - comment: Bars well-defined with edges; all segments distinguishable + comment: Bar segments perfectly visible with distinct Okabe-Ito colors, white + edges for definition. - id: VQ-04 name: Color Accessibility score: 2 max: 2 passed: true - comment: Okabe-Ito palette; colorblind-safe; good contrast throughout + comment: Okabe-Ito palette is CVD-safe. Good luminance contrast between segments + on both backgrounds. - id: VQ-05 name: Layout & Canvas score: 4 max: 4 passed: true - comment: 16:9 proportions with generous whitespace; nothing cut off + comment: 16:9 landscape uses 60–70% of canvas. Balanced margins, legend well-integrated. - id: VQ-06 name: Axis Labels & Title score: 2 max: 2 passed: true - comment: Proper format with descriptive labels and units + comment: X-axis 'Month', Y-axis 'Sales (Thousands $)' with units. Title format + correct. - id: VQ-07 name: Palette Compliance score: 2 max: 2 passed: true - comment: 'First series #009E73; Okabe-Ito order; theme-correct backgrounds; - both renders adapted' + comment: 'First series #009E73 (Okabe-Ito position 1). Multi-series follow + canonical order. Backgrounds #FAF8F1 (light) and #1A1A17 (dark). Theme-adaptive + chrome perfect in both renders. Data colors identical; only chrome flips.' design_excellence: - score: 13 + score: 10 max: 20 items: - id: DE-01 name: Aesthetic Sophistication - score: 5 + score: 4 max: 8 - passed: true - comment: Intentional Okabe-Ito usage; professional but fairly standard seaborn - styling + passed: false + comment: 'Well-configured defaults: theme tokens, spine removal, legend styling. + Professional but not exceptional.' - id: DE-02 name: Visual Refinement score: 4 max: 6 passed: true - comment: Spines removed; subtle grid; generous whitespace; custom legend styling + comment: 'Good refinement: spines removed, y-axis grid only, grid to background, + bar edges. Attention to detail visible.' - id: DE-03 name: Data Storytelling - score: 4 + score: 2 max: 6 - passed: true - comment: Total labels create hierarchy; seasonal patterns visible; could emphasize - further + passed: false + comment: Data choice smart (growth, seasonality) but storytelling implicit. + No visual emphasis on insights. spec_compliance: score: 15 max: 15 @@ -119,25 +133,27 @@ review: score: 5 max: 5 passed: true - comment: Correct stacked bar implementation + comment: Correct stacked bar chart using sns.histplot() with multiple='stack'. - id: SC-02 name: Required Features score: 4 max: 4 passed: true - comment: 'All features present: categories, components, values, totals' + comment: Stacked bars, category breakdown, component stacking, total labels + all present. - id: SC-03 name: Data Mapping score: 3 max: 3 passed: true - comment: Correct axis mapping; full data range visible + comment: X-axis shows all months. Y-axis shows cumulative values. Hue correctly + stacked. - id: SC-04 name: Title & Legend score: 3 max: 3 passed: true - comment: Correct title format; legend complete and descriptive + comment: Title format correct. Legend labels match data perfectly. data_quality: score: 15 max: 15 @@ -147,19 +163,21 @@ review: score: 6 max: 6 passed: true - comment: All stacked bar aspects demonstrated + comment: 'Shows all stacked bar aspects: multiple categories, growth, seasonality, + composition shifts.' - id: DQ-02 name: Realistic Context score: 5 max: 5 passed: true - comment: Plausible sales data with realistic seasonal patterns + comment: Real, neutral business scenario. Comprehensible, professional context. - id: DQ-03 name: Appropriate Scale score: 4 max: 4 passed: true - comment: Sensible thousands scale and value range + comment: Realistic values, sensible proportions, plausible patterns. Seed + 42 for reproducibility. code_quality: score: 10 max: 10 @@ -169,58 +187,59 @@ review: score: 3 max: 3 passed: true - comment: Straightforward imperative script; no functions/classes + comment: 'Linear flow: imports → tokens → data → plot → styling → save. No + functions/classes.' - id: CQ-02 name: Reproducibility score: 2 max: 2 passed: true - comment: Deterministic with np.random.seed(42) + comment: np.random.seed(42) set. All data deterministic. - id: CQ-03 name: Clean Imports score: 2 max: 2 passed: true - comment: Only necessary imports used + comment: 'All imports used: os, matplotlib.pyplot, numpy, pandas, seaborn.' - id: CQ-04 name: Code Elegance score: 2 max: 2 passed: true - comment: Appropriate complexity; no fake UI + comment: Clean, Pythonic. Appropriate complexity. No fake functionality. - id: CQ-05 name: Output & API score: 1 max: 1 passed: true - comment: Saves as plot-{THEME}.png with current API + comment: Saves as plot-{THEME}.png with 300 dpi, tight layout, correct background. library_mastery: - score: 6 + score: 4 max: 10 items: - id: LM-01 name: Idiomatic Usage - score: 4 + score: 3 max: 5 - passed: true - comment: sns.histplot with weights; sns.set_theme; axes-level API used idiomatically + passed: false + comment: sns.histplot() for categorical stacking is unconventional. Correct + but doesn't leverage library's best patterns. - id: LM-02 name: Distinctive Features - score: 2 + score: 1 max: 5 - passed: true - comment: Standard seaborn patterns; could use more advanced techniques + passed: false + comment: Generic usage. Theme-adaptive coloring is a pattern, not seaborn-specific. + Could replicate in matplotlib easily. verdict: APPROVED impl_tags: dependencies: [] techniques: - annotations - - custom-legend patterns: - data-generation - - groupby-aggregation - - iteration-over-groups + - explicit-figure dataprep: [] styling: - - publication-ready - grid-styling + - edge-highlighting