Skip to content

feat(makie): implement slope-basic#9915

Merged
MarkusNeusinger merged 6 commits into
mainfrom
implementation/slope-basic/makie
Jul 26, 2026
Merged

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

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Implementation: slope-basic - julia/makie

Implements the julia/makie version of slope-basic.

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

Parent Issue: #981


🤖 impl-generate workflow

github-actions Bot and others added 2 commits July 25, 2026 23:55
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

AI Review - Attempt 1/3

Image Description

Light render (plot-light.png): Warm off-white background (#FAF8F1). Bold dark-ink title "slope-basic · julia · makie · anyplot.ai" centered at top, fully visible with no clipping. Two vertical reference axes labeled "2023 Survey" / "2024 Survey" in medium-gray bold headers. Ten diagonal lines connect each product's 2023 and 2024 customer-satisfaction score, colored matte red (#AE3030, decrease) or brand green (#009E73, increase), with circular endpoint markers. Product name + score labels flank both axes in dark ink. A "Decrease"/"Increase" legend sits in a dedicated right-hand column. All text is clearly readable against the light background — no light-on-light issues.

Dark render (plot-dark.png): Warm near-black background (#1A1A17), not pure black. Same title, headers, and per-entity labels now render in light ink, clearly legible against the dark surface. Data line/marker colors are confirmed identical to the light render (#AE3030 red, #009E73 green) — only chrome flipped. No dark-on-dark failures; all text (title, headers, entity labels, legend) reads clearly, and both brand green and matte red remain visible on the dark surface.

Both renders pass the theme-readability check.

Score: 86/100

Category Score Max
Visual Quality 25 30
Design Excellence 14 20
Spec Compliance 15 15
Data Quality 14 15
Code Quality 10 10
Library Mastery 8 10
Total 86 100

Visual Quality (25/30)

  • VQ-01: Text Legibility (7/8) - Explicit sizes throughout (titlesize=20, label fontsize=15, legend 13), readable in both themes, no overflow
  • VQ-02: No Overlap (5/6) - No literal text collisions, but the anti-collision nudge drifts labels away from their true marker in the densest score bands, with no leader stub connecting them
  • VQ-03: Element Visibility (6/6) - Sparse data (10 entities) given prominent markers (markersize=13) and thick lines (linewidth=2.8)
  • VQ-04: Color Accessibility (1/2) - Red/green is the only explicit legend-level distinguishing cue; slope direction is redundant but not called out visually beyond geometry
  • VQ-05: Layout & Canvas (3/4) - Good overall balance; legend column carries excess unused whitespace around just two entries
  • VQ-06: Axis Labels & Title (1/2) - Time points are labeled ("2023/2024 Survey") but nothing on the chart indicates what the numeric values represent (no units/metric label)
  • VQ-07: Palette Compliance (2/2) - Exact Imprint hexes under the documented finance semantic exception (gain→green, loss→red); theme-correct chrome in both renders

Design Excellence (14/20)

  • DE-01: Aesthetic Sophistication (5/8) - Thoughtful semantic color use and intentional rank-sorted hierarchy, clearly above library defaults
  • DE-02: Visual Refinement (5/6) - Spines/decorations fully hidden, no grid, generous whitespace, refined marker strokes
  • DE-03: Data Storytelling (4/6) - Color contrast + descending sort create clear visual hierarchy, though the missing value-axis label costs some immediate clarity

Spec Compliance (15/15)

  • SC-01: Plot Type (5/5) - Correct slopegraph
  • SC-02: Required Features (4/4) - Endpoint labels, direction color-coding, labeled vertical axes, 10 entities (within 5-15 range)
  • SC-03: Data Mapping (3/3) - X/Y correctly assigned, all data visible
  • SC-04: Title & Legend (3/3) - Title format exact; legend labels match the semantic split

Data Quality (14/15)

  • DQ-01: Feature Coverage (5/6) - Mix of increases and decreases at varied magnitudes
  • DQ-02: Realistic Context (5/5) - Customer satisfaction survey scores across product lines — real, neutral, business-plausible
  • DQ-03: Appropriate Scale (4/4) - Scores in 48-100 range clamped sensibly for a 0-100 satisfaction scale

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3) - No functions/classes; linear imports→data→plot→save flow
  • CQ-02: Reproducibility (2/2) - Random.seed!(42)
  • CQ-03: Clean Imports (2/2) - CairoMakie, Colors, Random all used
  • CQ-04: Code Elegance (2/2) - No fake UI; nudge-loop complexity is justified by the label-collision problem it solves
  • CQ-05: Output & API (1/1) - save("plot-$(THEME).png", fig; px_per_unit=2), current API

Library Mastery (8/10)

  • LM-01: Idiomatic Usage (5/5) - hidedecorations!/hidespines!, vlines!/lines!/scatter!/text!, Legend with merge/unique — idiomatic high-level Makie API throughout
  • LM-02: Distinctive Features (3/5) - GridLayout-based legend column (fig[1,2] + colsize!) is a Makie-distinctive layout mechanism, though not a rare/showcase feature

Score Caps Applied

  • None

Strengths

  • Correct slopegraph structure: two vertical time-point axes labeled "2023 Survey"/"2024 Survey" with endpoint labels on both sides, exactly per spec notes
  • Semantic red/green color-coding for decrease/increase follows the Imprint style guide's finance semantic-exception rule, identical across both themes
  • Custom label anti-collision (min_gap nudging loop) keeps all 20 endpoint labels legible even where raw scores cluster tightly
  • Entities sorted by descending 2023 score, giving the chart a clear top-to-bottom rank ordering
  • Clean minimalist chrome: spines/decorations fully hidden, no gridlines, generous whitespace
  • Theme-adaptive chrome correctly threaded through PAGE_BG/INK/INK_SOFT tokens — both renders pass the light/dark legibility check
  • Idiomatic Makie usage: GridLayout-based legend placement, deterministic seed

Weaknesses

  • No label anywhere on the chart indicates what the numeric values represent (e.g. "Customer Satisfaction Score (0–100)") — add a small subtitle or axis caption near the vertical axes
  • In the densest score bands (Cloud Storage 54.1 vs Payment Gateway 53.8; Video Conferencing 61.7 vs Customer Portal 61.0), nudged label text drifts noticeably from its true marker/line with no leader stub, making it harder to trace which label belongs to which line exactly where it matters most
  • Decrease/Increase relies on red vs green as the only explicit legend-level cue — consider a small directional glyph (▲/▼) next to each value for full CVD robustness
  • Legend column carries a lot of unused vertical whitespace around just two entries — tighten the column or recenter the legend against the chart's vertical mass

Issues Found

  1. VQ-06 LOW: No value-axis label/units anywhere on the chart
    • Fix: Add a small subtitle (e.g. below the title) or caption near the axes stating the metric, e.g. "Customer Satisfaction Score (0–100)"
  2. VQ-02/DE-03 MEDIUM: Label-to-marker correspondence weakens in the densest score clusters
    • Fix: Add a thin leader stub from each nudged label to its true marker position, or reduce min_gap so labels stay closer to their true y-position while still avoiding overlap
  3. VQ-04 LOW: Red/green is the sole explicit color cue for direction
    • Fix: Add a small ▲/▼ glyph next to each right-hand value label, redundant with both color and slope

AI Feedback for Next Attempt

Add a metric/units caption for the value axis, tighten the label anti-collision nudge (or add leader stubs) so labels stay visually tied to their markers even in dense score bands, and consider a redundant directional glyph alongside the red/green color coding. The core slopegraph structure, semantic coloring, and Makie usage are all solid — these are refinements, not structural fixes.

Verdict: REJECTED

@github-actions github-actions Bot added quality:86 Quality score 86/100 ai-rejected Quality not OK, triggers update labels Jul 26, 2026
@github-actions github-actions Bot added ai-attempt-1 First repair attempt and removed ai-rejected Quality not OK, triggers update labels Jul 26, 2026
Attempt 1/4 - 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 Jul 26, 2026

Copy link
Copy Markdown
Contributor

AI Review - Attempt 2/3

Image Description

Light render (plot-light.png): Background is warm off-white (#FAF8F1). Title "slope-basic · julia · makie · anyplot.ai" is bold dark ink at top, fully visible. A new subtitle "Customer Satisfaction Score (0–100)" sits beneath it, correctly labeling the value axis. "2023 Survey"/"2024 Survey" headers top each vertical reference axis. Ten product names + scores flank both axes; right-hand labels now carry ▲/▼ direction glyphs, and thin dotted leader stubs reconnect nudged labels to their true marker positions in dense clusters. Legend ("Decrease"/"Increase") sits in a narrowed right-hand column. All text is clearly readable against the light background — no light-on-light issues.

Dark render (plot-dark.png): Same background near-black (#1A1A17). Title, subtitle, headers, and per-entity labels (including the ▲/▼ glyphs and leader stubs) flip to light ink and remain clearly legible. Data colors are confirmed identical to the light render — matte red (#AE3030, decrease) and brand green (#009E73, increase) — only chrome flipped. No dark-on-dark failures observed; all text reads clearly.

Both renders pass the theme-readability check.

Score: 92/100

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

Visual Quality (29/30)

  • VQ-01: Text Legibility (7/8)
  • VQ-02: No Overlap (6/6)
  • VQ-03: Element Visibility (6/6)
  • VQ-04: Color Accessibility (2/2)
  • VQ-05: Layout & Canvas (4/4)
  • VQ-06: Axis Labels & Title (2/2)
  • VQ-07: Palette Compliance (2/2)

Design Excellence (16/20)

  • DE-01: Aesthetic Sophistication (6/8) - Semantic color, rank sort, leader stubs and direction glyphs go beyond defaults; template still close to a standard slopegraph
  • DE-02: Visual Refinement (5/6) - Spines/decorations hidden, generous whitespace, refined marker strokes
  • DE-03: Data Storytelling (5/6) - Color contrast + sort + glyphs create clear hierarchy

Spec Compliance (15/15)

  • SC-01: Plot Type (5/5)
  • SC-02: Required Features (4/4)
  • SC-03: Data Mapping (3/3)
  • SC-04: Title & Legend (3/3)

Data Quality (15/15)

  • DQ-01: Feature Coverage (6/6)
  • DQ-02: Realistic Context (5/5)
  • DQ-03: Appropriate Scale (4/4)

Code Quality (10/10)

  • CQ-01: KISS Structure (3/3)
  • CQ-02: Reproducibility (2/2)
  • CQ-03: Clean Imports (2/2)
  • CQ-04: Code Elegance (2/2)
  • CQ-05: Output & API (1/1)

Library Mastery (7/10)

  • LM-01: Idiomatic Usage (4/5) - GridLayout legend, hidedecorations!/hidespines!, vlines! for reference axes
  • LM-02: Distinctive Features (3/5) - Custom anti-collision + leader-stub system is a genuine composition, but core marks remain generic

Score Caps Applied

  • None

Strengths

  • All four attempt-1 weaknesses are directly and correctly addressed: subtitle labels the value axis, dotted leader stubs restore label-to-marker traceability in dense clusters, ▲/▼ glyphs make direction CVD-safe independent of color, and the legend column was narrowed to cut unused whitespace
  • Correct slopegraph structure with endpoint labels on both sides, exactly per spec notes
  • Semantic red/green color-coding follows the Imprint style guide's semantic-exception rule, identical across both themes
  • Theme-adaptive chrome correctly threaded through PAGE_BG/INK/INK_SOFT tokens — both renders pass legibility
  • Clean minimalist chrome, idiomatic Makie usage (GridLayout legend, hidedecorations!/hidespines!, deterministic seed)

Weaknesses

  • Distinctive Makie-specific features are still underused — core marks (lines!, scatter!, text!) read as library-agnostic; leaning on more Makie-specific machinery would raise Library Mastery
  • In the tightest score bands, label rows sit close enough that legibility could soften slightly at small preview sizes (~400px), even though nothing overlaps at full resolution
  • Aesthetic sophistication is solid but still close to a standard slopegraph template — an additional refinement (e.g. subtle marker-size/opacity encoding for magnitude of change) would push Design Excellence higher

Issues Found

  1. LM-02 MEDIUM: Core marks are generic across libraries
    • Fix: Consider a Makie-distinctive touch (e.g. custom recipe, Observables-driven layout, or Scene-level composition) to differentiate from a generic implementation
  2. DE-01 LOW: Template stays close to a standard slopegraph
    • Fix: Consider encoding change-magnitude via marker size or line alpha for an extra layer of storytelling

AI Feedback for Next Attempt

This attempt cleanly resolved every weakness flagged in attempt 1 (value-axis label, label traceability, CVD-safe direction glyphs, legend whitespace). If iterating further, focus on Library Mastery — showcase a Makie-distinctive technique rather than generic primitives — and consider an optional magnitude encoding (marker size or alpha) for extra data storytelling.

Verdict: APPROVED

@github-actions github-actions Bot added quality:92 Quality score 92/100 ai-approved Quality OK, ready for merge and removed quality:86 Quality score 86/100 labels Jul 26, 2026
@MarkusNeusinger
MarkusNeusinger merged commit 96a227a into main Jul 26, 2026
3 checks passed
@MarkusNeusinger
MarkusNeusinger deleted the implementation/slope-basic/makie branch July 26, 2026 00:11
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:92 Quality score 92/100

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant