Skip to content

feat(makie): implement scatter-color-mapped - #11630

Merged
MarkusNeusinger merged 6 commits into
mainfrom
implementation/scatter-color-mapped/makie
Sep 5, 2026
Merged

feat(makie): implement scatter-color-mapped#11630
MarkusNeusinger merged 6 commits into
mainfrom
implementation/scatter-color-mapped/makie

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Implementation: scatter-color-mapped - julia/makie

Implements the julia/makie version of scatter-color-mapped.

File: plots/scatter-color-mapped/implementations/julia/makie.jl

Parent Issue: #2004


🤖 impl-generate workflow

@claude

claude Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

AI Review - Attempt 1/3

Image Description

Light render (plot-light.png): Warm off-white (#FAF8F1) background. Bold dark-ink title "scatter-color-mapped · julia · makie · anyplot.ai" at top; "Easting (m)" / "Northing (m)" axis labels in dark ink; tick labels and colorbar ticks in softer dark-gray ink; subtle light-gray gridlines on both axes; top/right spines removed. 250 scatter points colored on the Imprint sequential scale (brand green #009E73 → blue #4467A3), each with a thin off-white halo stroke separating touching points. Colorbar on the right labeled "Mineral Concentration (ppm)". All text is clearly readable against the light background.

Dark render (plot-dark.png): Warm near-black (#1A1A17) background. Same title, axis labels, and colorbar label now in light ink (~#F0EFE8); tick labels in a softer light-gray; gridlines flip to a light, subtle style; spine pattern unchanged. Data colors are identical to the light render (green→blue), with the marker halo stroke now drawn in the dark page color — confirming only chrome flips between themes. No dark-on-dark or light-on-light failures observed; all text remains legible.

Both paragraphs describe both renders as required.

Score: 85/100

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

Visual Quality (28/30)

  • VQ-01: Text Legibility (7/8)
  • VQ-02: No Overlap (6/6)
  • VQ-03: Element Visibility (5/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 (10/20)

  • DE-01: Aesthetic Sophistication (4/8) - Style-guide-compliant, competent default; the marker halo is a nice touch but doesn't yet read as a distinctive design
  • DE-02: Visual Refinement (4/6) - Spines removed, subtle theme-adaptive grid, theme-adaptive marker halo
  • DE-03: Data Storytelling (2/6) - The engineered easting-based concentration gradient in the data isn't visually emphasized

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 (5/5) - Colorbar(fig[1,2], sc; ...) binds the plot object directly, the idiomatic Makie pattern
  • LM-02: Distinctive Features (2/5) - Generic scatter+colorbar usage, nothing unique to Makie beyond the standard pattern

Score Caps Applied

  • None

Strengths

  • Correct Imprint sequential colormap (brand green → blue) built with cgrad and bound directly to the Colorbar via the scatter plot object
  • Theme-adaptive chrome correctly threaded through every element (title, axis labels, ticks, spines, grid, colorbar) in both renders
  • Marker halo (strokecolor = PAGE_BG, strokewidth = 0.75) is a thoughtful theme-adaptive detail that separates overlapping points
  • Clean KISS structure, reproducible via Random.seed!(42), correct canonical title, exact 3200×1800 canvas
  • Realistic, neutral geoscience scenario (mineral concentration over a survey grid) with sensible units and ranges

Weaknesses

  • Data storytelling is minimal: the engineered spatial gradient in the data isn't visually emphasized — the viewer has to find the trend themselves
  • A handful of marker pairs overlap in dense clusters; consider adding a touch of alpha alongside the existing stroke halo, per the spec's own note to "consider transparency if points overlap significantly"
  • Library Mastery reads as generic — leverage a more Makie-distinctive feature to better showcase the library
  • Aesthetic sophistication reads as a well-configured, compliant default rather than a design with a clear intentional focal point

Issues Found

  1. DE-03 LOW: No visual hierarchy or emphasis on the spatial trend in the data
    • Fix: Consider a subtle callout/annotation on the region of highest concentration, or a slightly stronger visual cue (e.g., size or alpha variation tied to concentration) to guide the viewer to the insight
  2. DE-01 LOW: Reads as a competent, compliant default rather than a distinctive design
    • Fix: Add one or two intentional refinements beyond the style-guide baseline (e.g., refined typography weight/hierarchy, a more deliberate focal point)
  3. VQ-03 MINOR: A few marker clusters overlap
    • Fix: Add slight alpha (e.g., ~0.85) to markers to soften overlap while keeping the halo stroke

AI Feedback for Next Attempt

Solid, spec-compliant, theme-correct implementation with clean idiomatic Makie usage. To push into the 90+ range: give the plot a clearer point of view (emphasize the spatial concentration gradient visually, not just via the colorbar), add one or two more distinctive design touches beyond the style-guide baseline, and consider light alpha on markers to smooth over the few overlapping clusters.

Verdict: REJECTED

@github-actions github-actions Bot added quality:85 Quality score 85/100 ai-rejected Quality not OK, triggers update labels Sep 5, 2026
@github-actions github-actions Bot added ai-attempt-1 First repair attempt and removed ai-rejected Quality not OK, triggers update labels Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

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 Sep 5, 2026

Copy link
Copy Markdown
Contributor

AI Review - Attempt 2/3

⚠️ Pipeline Note (read before scoring below)

The plot_images/plot-light.png and plot_images/plot-dark.png supplied for this review were verified to be stale — pixel-diffing shows they match the attempt-1 code (commit 118de8ec1: no heatmap backdrop, no marker alpha) rather than the current fix commit (4d119e156). To review the actual PR content, the implementation was independently re-executed with Julia 1.11.9 against the repo's own Project.toml/Manifest.toml (which pin julia_version = "1.11.9" and Makie 0.21.9, matching the file header), producing a faithful, verified render of the current code for both themes. Scoring below reflects that verified render, not the stale plot_images/ files. This is a CI artifact-refresh issue in the pipeline (images weren't regenerated after the repair commit before invoking this review) — not an implementation defect, so no .jl change is warranted for it.

Image Description

Light render (verified, current code): Warm off-white (#FAF8F1) background, now overlaid by a subtle (alpha=0.18) translucent heatmap of the noise-free spatial trend, tinting the surface from pale green (low easting) toward pale blue-lavender (high easting). Bold dark-ink title "scatter-color-mapped · julia · makie · anyplot.ai"; "Easting (m)" / "Northing (m)" axis labels in dark ink; softer dark-gray tick/colorbar labels; subtle gridlines; top/right spines removed. 250 scatter points on the Imprint sequential scale (#009E73#4467A3), semi-transparent (alpha=0.85) with a thin off-white halo stroke. Colorbar labeled "Mineral Concentration (ppm)". All text is clearly readable against the light, gently gradient-tinted background.

Dark render (verified, current code): Warm near-black (#1A1A17) background tinted by the same backdrop into dark teal (west) to dark blue-gray (east). Title, axis labels, and colorbar label in light ink; tick labels in softer light-gray; gridlines flip to a light, subtle style. Data colors are identical to the light render (green→blue) — only chrome and the backdrop's base tone flip between themes. No dark-on-dark or light-on-light failures observed; all text remains legible.

Both paragraphs describe both renders as required.

Score: 92/100

Category Score Max
Visual Quality 29 30
Design Excellence 16 20
Spec Compliance 15 15
Data Quality 14 15
Code Quality 10 10
Library Mastery 8 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) — marker alpha=0.85 added this attempt resolves the prior overlap-visibility ding
  • 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) - Layered heatmap-trend + scatter with a shared color language reads as an intentional, more distinctive design
  • DE-02: Visual Refinement (5/6) - Spines removed, subtle theme-adaptive grid, refined halo, smooth backdrop blending
  • DE-03: Data Storytelling (5/6) - Spatial gradient now reads at a glance via the backdrop, resolving the prior weakness; docked slightly for a colorrange nuance (see Issues)

Spec Compliance (15/15)

  • SC-01: Plot Type (5/5)
  • SC-02: Required Features (4/4) - perceptually-uniform colormap, labeled colorbar, moderate point size, and now transparency for overlap — all spec notes satisfied
  • SC-03: Data Mapping (3/3)
  • SC-04: Title & Legend (3/3)

Data Quality (14/15)

  • DQ-01: Feature Coverage (5/6) - docked slightly, see Issues
  • 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 (8/10)

  • LM-01: Idiomatic Usage (5/5) - Colorbar(fig[1,2], sc; ...) binds the plot object directly
  • LM-02: Distinctive Features (3/5) - heatmap! + scatter! layering with a shared colormap is a nice compositional touch

Score Caps Applied

  • None

Strengths

  • Marker alpha=0.85 added exactly as the spec's own note suggests ("consider transparency if points overlap significantly"), softening the previously flagged overlapping clusters
  • New translucent heatmap backdrop of the noise-free spatial trend gives the plot an immediate, at-a-glance sense of the eastward concentration gradient, directly resolving the prior review's DE-03 weakness
  • Colorbar bound directly to the scatter plot object, the idiomatic Makie pattern
  • Theme-adaptive chrome correctly threaded through every element in both renders, confirmed by an independent re-render of the exact commit
  • Clean KISS structure, reproducible, correct canonical title, exact 3200×1800 canvas
  • Realistic, neutral geoscience scenario with sensible units and ranges

Weaknesses

  • The heatmap backdrop uses colorrange = extrema(trend_zs) while the scatter/colorbar use a fixed colorrange = (5.0, 100.0) — both share the same IMPRINT_SEQ colormap and the figure exposes only one Colorbar (bound to the scatter), so identical-looking backdrop and marker hues do not necessarily represent the same ppm value on the visible colorbar
  • A handful of marker pairs still visually touch in the densest clusters even with alpha=0.85; a slightly smaller markersize (~14) there would fully resolve it

Issues Found

  1. DQ-01/DE-03 LOW: Heatmap backdrop and scatter markers share one colormap but different colorranges, so the shared colorbar's ticks don't calibrate the backdrop layer
    • Fix: pass colorrange = color_range to the heatmap! call as well (or accept a minor visual mismatch since the backdrop is explicitly a qualitative/unscaled trend indicator)

AI Feedback for Next Attempt

Great trajectory — the trend-backdrop and alpha fix resolved the attempt-1 storytelling and overlap weaknesses. One correctness nit remains: align the heatmap's colorrange with the scatter/colorbar's fixed (5.0, 100.0) range so the single shared colorbar stays numerically accurate for both layers. Separately: the plot_images/ artifacts served to reviewers for this attempt were stale (attempt-1 renders) — please check the impl-review workflow's image-generation step to ensure it regenerates plot_images after each repair commit before invoking the AI reviewer.

Verdict: APPROVED

@github-actions github-actions Bot added quality:92 Quality score 92/100 ai-approved Quality OK, ready for merge and removed quality:85 Quality score 85/100 labels Sep 5, 2026
@MarkusNeusinger
MarkusNeusinger merged commit 5bee988 into main Sep 5, 2026
@MarkusNeusinger
MarkusNeusinger deleted the implementation/scatter-color-mapped/makie branch September 5, 2026 14:40
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