Skip to content

feat(makie): implement errorbar-basic#9527

Merged
MarkusNeusinger merged 6 commits into
mainfrom
implementation/errorbar-basic/makie
Jun 30, 2026
Merged

feat(makie): implement errorbar-basic#9527
MarkusNeusinger merged 6 commits into
mainfrom
implementation/errorbar-basic/makie

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Implementation: errorbar-basic - julia/makie

Implements the julia/makie version of errorbar-basic.

File: plots/errorbar-basic/implementations/julia/makie.jl

Parent Issue: #973


🤖 impl-generate workflow

@claude

claude Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

AI Review - Attempt 1/3

Image Description

Light render (plot-light.png): Warm off-white background (#FAF8F1) — correct, not pure white. Title "errorbar-basic · julia · makie · anyplot.ai" displayed in dark ink at approximately 65% of plot width, well-proportioned. X-axis label "Light Intensity" and Y-axis label "Mean Seedling Height (cm)" in dark INK, clearly readable. Tick labels ("50 lux" through "1600 lux"; numeric Y values) rendered in softer INK_SOFT. Subtle horizontal Y-axis grid lines at 15% opacity; X-grid disabled. Error bars, connecting line, and scatter markers all in Imprint brand green (#009E73); scatter markers carry a cream PAGE_BG stroke giving clean definition against the background. The 6-point saturation curve from 50 to 1600 lux is clearly visible. All text is readable against the light background — no light-on-light failures. Legibility verdict: PASS.

Dark render (plot-dark.png): Warm near-black background (#1A1A17) — correct, not pure black. Title and axis labels flip to light text (#F0EFE8 equivalent); tick labels to softer #B8B7B0. All chrome adapts correctly — no dark-on-dark failures observed anywhere. Data colors are identical to the light render: the error bars, line, and scatter markers remain #009E73 (only the stroke adapts to dark PAGE_BG). Brand green reads clearly on the dark surface. Subtle Y-grid lines visible. Legibility verdict: PASS — both themes render correctly.

Score: 87/100

Category Score Max
Visual Quality 29 30
Design Excellence 11 20
Spec Compliance 15 15
Data Quality 15 15
Code Quality 10 10
Library Mastery 7 10
Total 87 100

Visual Quality (29/30)

  • VQ-01: Text Legibility (7/8) — titlesize=20, xlabelsize/ylabelsize=14 explicitly set; xticklabelsize/yticklabelsize inherited from Figure(fontsize=14) rather than set at Axis level. Visual result is well-proportioned and readable in both themes.
  • VQ-02: No Overlap (6/6) — No overlapping elements. 6 well-spaced points on a categorical X-axis.
  • VQ-03: Element Visibility (6/6) — markersize=14 and whiskerwidth=12 are appropriately prominent for 6 sparse data points. Error bar caps clearly visible.
  • VQ-04: Color Accessibility (2/2) — Single series in #009E73 with PAGE_BG stroke for shape redundancy. CVD-safe.
  • VQ-05: Layout & Canvas (4/4) — Good canvas utilization, balanced margins. Y-axis label tight to left edge but all pixels intact.
  • VQ-06: Axis Labels & Title (2/2) — Y: "Mean Seedling Height (cm)" with units. X: "Light Intensity" with units via tick labels (50 lux, 100 lux, …). Title format correct.
  • VQ-07: Palette Compliance (2/2) — Single series = #009E73 (Imprint brand green). Background #FAF8F1 / #1A1A17 theme-correct. All chrome tokens properly adaptive.

Design Excellence (11/20)

  • DE-01: Aesthetic Sophistication (5/8) — Above default: intentional three-layer composition (errorbars + lines + scatter), stroked markers, Y-only subtle grid. But no visual emphasis on the key biological insight (growth saturation at high lux) and typography hierarchy follows the template without distinctive choices.
  • DE-02: Visual Refinement (4/6) — Y-only grid and spine removal are good. However: style guide recommends no grid for plots with few datapoints (only 6 here); xticklabelsize/yticklabelsize not set at Axis level.
  • DE-03: Data Storytelling (2/6) — Default: data displayed clearly but not interpreted. The growth saturation plateau (800–1600 lux leveling off) is the key insight visible in the data, but no annotation, shaded region, or focal point guides the viewer to it.

Spec Compliance (15/15)

  • SC-01: Plot Type (5/5) — Correct: errorbars!() with visible caps (whiskerwidth=12). Symmetric error bars appropriate for "basic" spec.
  • SC-02: Required Features (4/4) — Visible caps, consistent widths, symmetric errors, central markers all present.
  • SC-03: Data Mapping (3/3) — X=light intensity (categorical), Y=mean height (numeric), error=std. All 6 data points visible.
  • SC-04: Title & Legend (3/3) — Title "errorbar-basic · julia · makie · anyplot.ai" — correct format. Single series; no legend appropriate.

Data Quality (15/15)

  • DQ-01: Feature Coverage (6/6) — Error bars with caps, varying magnitudes (std 0.35→0.85), central values, connecting trend line. Core features fully represented.
  • DQ-02: Realistic Context (5/5) — Botanical scenario: seedling heights under measured light intensities (50–1600 lux), n=20 replicates, std deviation. Neutral, scientifically credible.
  • DQ-03: Appropriate Scale (4/4) — Heights 1.2–7.8 cm plausible for seedlings; stds 0.35–0.85 cm realistic. Light range spans indoor to bright conditions. Saturation curve biologically valid.

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3) — Linear: constants → data → figure → plot layers → save. No functions/classes.
  • CQ-02: Reproducibility (2/2) — Random.seed!(42) present; data is deterministic (hardcoded arrays).
  • CQ-03: Clean Imports (3/3) — CairoMakie, Colors, Random — all used.
  • CQ-04: Code Elegance (2/2) — Clean idiomatic Julia. Minor verbosity in RGBAf(Float32(INK.r), …) casts (Makie handles conversion implicitly), but correct.
  • CQ-05: Output & API (1/1) — save("plot-$(THEME).png", fig; px_per_unit=2). Uses size= (modern Makie). Canvas gate passed (3200×1800).

Library Mastery (7/10)

  • LM-01: Idiomatic Usage (4/5) — Correct Makie primitive layering (errorbars!, lines!, scatter! composited on one Axis). RGBAf for alpha grid color. colorant"#..." syntax. Figure/Axis layout idiomatic.
  • LM-02: Distinctive Features (3/5) — Makie-idiomatic primitive layering (vs. matplotlib's single errorbar() call) and strokewidth/strokecolor on scatter markers (Makie-specific). Could go further with hidespines!(), hidedecorations!(), or explicit Axis(xautolimitmargin=…) for tighter control.

Score Caps Applied

  • None — DE-01=5 > 2 and DE-02=4 > 2, so the "generic + no visual refinement" cap does not trigger.

Strengths

  • Brand green #009E73 used correctly as first (and only) series color; Imprint palette fully compliant
  • Elegant three-layer composition: errorbars! + lines! + scatter! shows trend and uncertainty simultaneously — a deliberate and effective design choice
  • Scatter markers with strokecolor=PAGE_BG create clean definition against both light and dark surfaces
  • Full theme-adaptive chrome: all text, grid, spine colors use INK/INK_SOFT tokens — both renders pass legibility
  • Realistic scientific dataset (plant seedling growth under light intensities) with a biologically plausible saturation curve and varying error magnitudes
  • Y-only subtle grid and top/right spine removal — clean, uncluttered layout
  • Perfect spec compliance: error bars with visible caps, correct title format, correct axes with units
  • Perfect code quality: KISS structure, clean imports, explicit sizing, correct output format

Weaknesses

  • DE-01/DE-03 LOW: No visual emphasis on the key insight — the growth saturation at 800–1600 lux is the biological story but nothing draws attention to it. Add a subtle annotation (e.g., text label "Plateau ~7–8 cm" near the saturation region) or a shaded reference band to guide the viewer.
  • DE-02 MODERATE: xticklabelsize and yticklabelsize not explicitly set on the Axis (inherited from Figure fontsize). Set them explicitly (e.g., 12pt) per the Makie style template. Also consider removing the Y-grid entirely — with only 6 data points the grid adds visual noise without aiding reading.
  • LM-02 MODERATE: Does not use Makie-distinctive features beyond primitive layering and marker strokes. Consider hidespines!(ax) + manual spine re-draw, or Axis(xautolimitmargin=(0.08, 0.08)) for tighter padding control.

Issues Found

  1. DE-03 LOW (2/6): No visual storytelling — growth saturation story is inherent but not surfaced
    • Fix: Add a text annotation near the 800–1600 lux region (e.g., text!(ax, 5.5, 7.6, text="Plateau", ...)) or a horizontal dashed reference line at the plateau level to direct the viewer's eye
  2. DE-01 MODERATE (5/8): Design is clean but doesn't achieve "strong design" level
    • Fix: Combine the annotation above with explicit tick label sizing and a slightly bolder title weight to create clearer typographic hierarchy

AI Feedback for Next Attempt

Score 87/100 — strong technically (29/30 Visual Quality, 15/15 Spec, 15/15 Data, 10/10 Code) but Design Excellence (11/20) is the gap. Two targeted fixes will close it:

  1. Add storytelling: Annotate the saturation plateau — e.g., text!(ax, 5.5, 7.65, text="Plateau", fontsize=12, color=INK_SOFT, align=(:center,:bottom)) or a horizontal dashed reference line at y≈7.5. This alone lifts DE-03 from 2→4.
  2. Explicit tick sizes + drop grid: Set xticklabelsize=12, yticklabelsize=12 on the Axis and remove ygridcolor / set ygridvisible=false — for 6 sparse data points the grid is unnecessary noise (style guide: "prefer no grid for simple plots with few data points"). This lifts DE-02 from 4→5.
    These two changes should push the total from 87 to ~92, clearing the attempt-2 threshold (≥80) comfortably.

Verdict: REJECTED

@github-actions github-actions Bot added quality:87 Quality score 87/100 ai-rejected Quality not OK, triggers update labels Jun 30, 2026
@github-actions github-actions Bot added ai-attempt-1 First repair attempt and removed ai-rejected Quality not OK, triggers update labels Jun 30, 2026
Attempt 1/3 - fixes based on AI review
@github-actions

Copy link
Copy Markdown
Contributor Author

🔧 Repair Attempt 1/4

Applied fixes based on AI review feedback.

Status: Repair completed, re-triggering review...


🤖 impl-repair

@claude

claude Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

AI Review - Attempt 2/3

Image Description

Light render (plot-light.png): Warm off-white (#FAF8F1) background — correct theme surface. Title "errorbar-basic · julia · makie · anyplot.ai" in bold dark text, centered and fully readable. Y-axis label "Mean Seedling Height (cm)" with units, rotated; X-axis label "Light Intensity" — both in dark INK text. Tick labels ("50 lux" … "1600 lux"; 2.5/5.0/7.5) in INK_SOFT dark gray. Single series in #009E73 brand green: errorbars with horizontal whisker caps, smooth trend line through 6 data points, circular scatter markers with PAGE_BG stroke. A very subtle shaded vspan region at far right (~0.08 alpha, barely perceptible) and a "growth plateau" annotation in INK_MUTED near the top. Faint horizontal grid lines at y=2.5/5.0/7.5 visible despite ygridvisible=false in code. L-shaped spine frame (top/right removed). All text clearly readable against the light background — no light-on-light issues.

Dark render (plot-dark.png): Warm near-black (#1A1A17) background — correct dark theme surface. Title in cream (#F0EFE8), axis labels in cream, tick labels in INK_SOFT (#B8B7B0 soft gray) — all clearly visible against dark background. Data colors are identical to the light render: #009E73 brand green for errorbars, line, and scatter markers — only chrome flipped, data colors unchanged. Brand green #009E73 well-contrasted on the dark surface. "growth plateau" annotation in #A8A79F (~8:1 contrast ratio) — readable. No dark-on-dark failures detected. Faint horizontal grid lines present similarly. All text readable.

Both paragraphs confirmed. Both renders pass theme-readability checks.

Score: 88/100

Category Score Max
Visual Quality 29 30
Design Excellence 12 20
Spec Compliance 15 15
Data Quality 15 15
Code Quality 10 10
Library Mastery 7 10
Total 88 100

Visual Quality (29/30)

  • VQ-01: Text Legibility (7/8) — All sizes explicitly set (titlesize=20, label=14, tick=12). Both themes fully readable. Minor: annotation fontsize=12 in INK_MUTED slightly subtle at mobile scale.
  • VQ-02: No Overlap (6/6) — 6 well-spaced data points, no text collisions.
  • VQ-03: Element Visibility (6/6) — markersize=14 and whiskerwidth=12 appropriate for sparse 6-point data.
  • VQ-04: Color Accessibility (2/2) — Single series #009E73, excellent contrast on both surfaces, CVD-safe.
  • VQ-05: Layout & Canvas (4/4) — Canvas gate passed (3200×1800). Good whitespace, L-shaped frame, no clipping.
  • VQ-06: Axis Labels & Title (2/2) — "Mean Seedling Height (cm)" with units; "Light Intensity" descriptive.
  • VQ-07: Palette Compliance (2/2) — First series IMPRINT_PALETTE[1]=#009E73. Backgrounds #FAF8F1/#1A1A17. All chrome theme-adaptive, data colors identical across renders.

Design Excellence (12/20)

  • DE-01: Aesthetic Sophistication (5/8) — Layered composition (errorbars+line+scatter) with Imprint palette shows clear intentional design above library defaults. vspan+annotation add narrative intent. The vspan at 0.08 alpha is barely perceptible, which weakens visual impact.
  • DE-02: Visual Refinement (4/6) — L-shaped spine frame, INK_SOFT spine colors, scatter marker strokewidth=1.5 for definition. Horizontal grid lines appear in renders despite ygridvisible=false (minor inconsistency).
  • DE-03: Data Storytelling (3/6) — Growth plateau story present via annotation + vspan, but vspan at 0.08 alpha barely registers; annotation carries the full storytelling burden alone.

Spec Compliance (15/15)

  • SC-01: Plot Type (5/5) — Correct error bar plot; errorbars! with horizontal caps via whiskerwidth.
  • SC-02: Required Features (4/4) — Error bars with caps, consistent widths, markers, connected trend line all present.
  • SC-03: Data Mapping (3/3) — X: categorical light levels; Y: mean height (cm); error: std dev. All 6 points displayed.
  • SC-04: Title & Legend (3/3) — Title format correct. Single series, no legend required.

Data Quality (15/15)

  • DQ-01: Feature Coverage (6/6) — Error bars, trend line, markers, region highlight, annotation — comprehensive.
  • DQ-02: Realistic Context (5/5) — Seedling height under light intensity levels — scientifically plausible, neutral, real-world domain.
  • DQ-03: Appropriate Scale (4/4) — 6 points within spec range; values (1.2–7.8 cm), light levels (50–1600 lux), std devs (0.35–0.85) all realistic.

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3) — Linear script: theme tokens → data → plot → save. No functions/classes.
  • CQ-02: Reproducibility (2/2) — Random.seed!(42) set; data is hardcoded arrays (deterministic).
  • CQ-03: Clean Imports (2/2) — CairoMakie, Colors, Random — all imported and used.
  • CQ-04: Code Elegance (2/2) — Clean and readable. RGBAf inline for vspan color is slightly verbose but correct. No fake UI.
  • CQ-05: Output & API (1/1) — Saves as plot-$(THEME).png with px_per_unit=2. Correct.

Library Mastery (7/10)

  • LM-01: Idiomatic Usage (4/5) — Five Makie recipes composited on one Axis; proper Figure/Axis API; RGBAf for alpha; colorant strings from Colors.jl — consistently idiomatic.
  • LM-02: Distinctive Features (3/5) — errorbars! with whiskerwidth (Makie-specific recipe), vspan! for region highlighting (Makie-specific), layer composition of 5 plot primitives showcasing Makie's composable design.

Score Caps Applied

  • None — all cap conditions clear.

Strengths

  • Clean layer composition (errorbars! + lines! + scatter!) showcasing Makie's composable API — standard approach executed well
  • Excellent theme adaptation throughout: all chrome elements use correct INK/INK_SOFT tokens for both renders with no dark-on-dark failures
  • Error bars have visible horizontal caps (whiskerwidth=12) meeting the spec requirement explicitly
  • Data storytelling via vspan highlight + growth plateau annotation adds genuine narrative value
  • Idiomatic CairoMakie code using native recipes, RGBAf, colorant strings, and Figure/Axis API

Weaknesses

  • vspan! highlight alpha is 0.08 — barely perceptible in both renders; the plateau region highlight intended as a focal point barely registers visually
  • "growth plateau" annotation uses fontsize=12 with INK_MUTED color — readable but quite small; could be slightly larger for better mobile-scale visibility
  • Grid lines appear visible in renders at y=2.5, 5.0, 7.5 despite xgridvisible=false and ygridvisible=false in code — if unintentional, verify Makie attribute names for this version; if intentional, add explicit ygridcolor styling per the Makie guide skeleton

Issues Found

  1. DE-03 MODERATE: vspan background highlight at alpha=0.08 is nearly invisible — the key focal-point element for the growth plateau story barely registers in either render
    • Fix: Increase vspan alpha from 0.08 to 0.12–0.15 so the highlighted region is subtly but clearly visible
  2. DE-02 MINOR: Horizontal grid lines appear in renders (y=2.5, 5.0, 7.5) despite both xgridvisible and ygridvisible set to false
    • Fix: Either add explicit with to style them intentionally, or verify the correct Makie attribute to fully suppress them

AI Feedback for Next Attempt

Increase vspan alpha to 0.12–0.15 so the growth saturation region is visually perceptible as a gentle background highlight. Optionally increase the "growth plateau" annotation to fontsize=13 for slightly better readability at mobile scale. If the horizontal grid lines are unintended, check Makie's current attribute name for disabling them; if they are wanted (they do aid value reading on a scientific plot), style them explicitly with ygridcolor at 0.15 alpha as shown in the Makie guide skeleton.

Verdict: APPROVED

@github-actions github-actions Bot added quality:88 Quality score: 88/100 ai-approved Quality OK, ready for merge and removed quality:87 Quality score 87/100 labels Jun 30, 2026
@MarkusNeusinger MarkusNeusinger merged commit fbc44ff into main Jun 30, 2026
@MarkusNeusinger MarkusNeusinger deleted the implementation/errorbar-basic/makie branch June 30, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-approved Quality OK, ready for merge ai-attempt-1 First repair attempt quality:88 Quality score: 88/100

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant