From 5286047886b4c148425bc9b174054204caaa1322 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Aug 2026 11:28:47 +0000 Subject: [PATCH 1/5] feat(makie): implement waterfall-basic --- .../implementations/julia/makie.jl | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 plots/waterfall-basic/implementations/julia/makie.jl diff --git a/plots/waterfall-basic/implementations/julia/makie.jl b/plots/waterfall-basic/implementations/julia/makie.jl new file mode 100644 index 0000000000..c28e33c776 --- /dev/null +++ b/plots/waterfall-basic/implementations/julia/makie.jl @@ -0,0 +1,126 @@ +# anyplot.ai +# waterfall-basic: Basic Waterfall Chart +# Library: Makie.jl 0.12 | Julia 1.11 +# Quality: pending | Created: 2026-08-04 + +using CairoMakie +using Colors +using Printf + +# --- Theme tokens ------------------------------------------------------------- +const THEME = get(ENV, "ANYPLOT_THEME", "light") +const PAGE_BG = THEME == "light" ? colorant"#FAF8F1" : colorant"#1A1A17" +const INK = THEME == "light" ? colorant"#1A1A17" : colorant"#F0EFE8" +const INK_SOFT = THEME == "light" ? colorant"#4A4A44" : colorant"#B8B7B0" + +const IMPRINT_PALETTE = [ + colorant"#009E73", colorant"#C475FD", colorant"#4467A3", colorant"#BD8233", + colorant"#AE3030", colorant"#2ABCCD", colorant"#954477", colorant"#99B314", +] +const BRAND = IMPRINT_PALETTE[1] # Imprint palette position 1 — increases +const LOSS = IMPRINT_PALETTE[5] # Imprint semantic anchor for loss — decreases +const NEUTRAL = INK # theme-adaptive neutral — start/end totals + +# --- Data: quarterly profit bridge, $ millions -------------------------------- +categories = ["Starting\nBalance", "Product\nSales", "Service\nRevenue", + "Operating\nCosts", "Marketing\nSpend", "Taxes", "Net\nProfit"] +deltas = [12.4, 8.5, 4.3, -5.4, -3.1, -1.85, 0.0] +is_total = [true, false, false, false, false, false, true] +n = length(categories) + +running = zeros(Float64, n) +running[1] = deltas[1] +for i in 2:(n - 1) + running[i] = running[i - 1] + deltas[i] +end +running[n] = running[n - 1] + +bottoms = zeros(Float64, n) +tops = zeros(Float64, n) +bar_colors = Vector{typeof(BRAND)}(undef, n) +for i in 1:n + if is_total[i] + bottoms[i] = 0.0 + tops[i] = running[i] + bar_colors[i] = NEUTRAL + else + lo, hi = extrema((running[i - 1], running[i])) + bottoms[i] = lo + tops[i] = hi + bar_colors[i] = deltas[i] >= 0 ? BRAND : LOSS + end +end + +# --- Title (fontsize scaled to length — see plot-generator.md) ---------------- +title_str = "Quarterly Profit Bridge · waterfall-basic · julia · makie · anyplot.ai" +title_fontsize = round(Int, 20 * min(1.0, 67 / length(title_str))) + +# --- Plot ----------------------------------------------------------------------- +fig = Figure( + resolution = (1600, 900), + fontsize = 14, + backgroundcolor = PAGE_BG, +) + +ax = Axis( + fig[1, 1]; + title = title_str, + titlesize = title_fontsize, + titlecolor = INK, + ylabel = "Amount (\$M)", + ylabelsize = 14, + ylabelcolor = INK, + xticklabelcolor = INK_SOFT, + yticklabelcolor = INK_SOFT, + xticklabelsize = 12, + yticklabelsize = 12, + backgroundcolor = PAGE_BG, + topspinevisible = false, + rightspinevisible = false, + leftspinecolor = INK_SOFT, + bottomspinecolor = INK_SOFT, + xgridvisible = false, + ygridcolor = RGBAf(INK.r, INK.g, INK.b, 0.15), + xticks = (1:n, categories), + xticksvisible = false, +) + +bar_width = 0.62 +barplot!(ax, 1:n, tops; fillto = bottoms, color = bar_colors, width = bar_width, strokewidth = 0) + +# Connecting lines linking each bar's cumulative level to the next bar's start +half = bar_width / 2 +for i in 1:(n - 1) + level = running[i] + lines!(ax, [i + half, i + 1 - half], [level, level]; + color = INK_SOFT, linewidth = 1.5, linestyle = :dot) +end + +# Running total labels — above the bar for increases/totals, below for decreases +label_offset = maximum(tops) * 0.035 +for i in 1:n + label = @sprintf("\$%.2fM", running[i]) + if is_total[i] || deltas[i] >= 0 + text!(ax, i, tops[i] + label_offset; text = label, + align = (:center, :bottom), color = INK, fontsize = 13) + else + text!(ax, i, bottoms[i] - label_offset; text = label, + align = (:center, :top), color = INK, fontsize = 13) + end +end + +ylims!(ax, -maximum(tops) * 0.08, maximum(tops) * 1.18) + +elements = [PolyElement(color = BRAND), PolyElement(color = LOSS), PolyElement(color = NEUTRAL)] +Legend(fig[1, 1], elements, ["Increase", "Decrease", "Total"]; + tellwidth = false, tellheight = false, + halign = :left, valign = :top, + orientation = :horizontal, + framevisible = false, + labelcolor = INK_SOFT, + labelsize = 12, + backgroundcolor = :transparent, +) + +# --- Save ----------------------------------------------------------------------- +save("plot-$(THEME).png", fig; px_per_unit = 2) From 42d294784d3b2aa337d00dd318e57eff13765d3e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Aug 2026 11:29:01 +0000 Subject: [PATCH 2/5] chore(makie): add metadata for waterfall-basic --- .../waterfall-basic/metadata/julia/makie.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plots/waterfall-basic/metadata/julia/makie.yaml diff --git a/plots/waterfall-basic/metadata/julia/makie.yaml b/plots/waterfall-basic/metadata/julia/makie.yaml new file mode 100644 index 0000000000..ba4aaa7688 --- /dev/null +++ b/plots/waterfall-basic/metadata/julia/makie.yaml @@ -0,0 +1,21 @@ +# Per-library metadata for makie implementation of waterfall-basic +# Auto-generated by impl-generate.yml + +library: makie +language: julia +specification_id: waterfall-basic +created: '2026-08-04T11:29:00Z' +updated: '2026-08-04T11:29:00Z' +generated_by: claude-sonnet +workflow_run: 30904486628 +issue: 777 +language_version: 1.11.9 +library_version: 0.21.9 +preview_url_light: https://storage.googleapis.com/anyplot-images/plots/waterfall-basic/julia/makie/plot-light.png +preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/waterfall-basic/julia/makie/plot-dark.png +preview_html_light: null +preview_html_dark: null +quality_score: null +review: + strengths: [] + weaknesses: [] From c8a094e688d123f64522395b83a82aaf1c9566a5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Aug 2026 11:35:06 +0000 Subject: [PATCH 3/5] chore(makie): update quality score 88 and review feedback for waterfall-basic --- .../implementations/julia/makie.jl | 4 +- .../waterfall-basic/metadata/julia/makie.yaml | 257 +++++++++++++++++- 2 files changed, 252 insertions(+), 9 deletions(-) diff --git a/plots/waterfall-basic/implementations/julia/makie.jl b/plots/waterfall-basic/implementations/julia/makie.jl index c28e33c776..68178f26cb 100644 --- a/plots/waterfall-basic/implementations/julia/makie.jl +++ b/plots/waterfall-basic/implementations/julia/makie.jl @@ -1,7 +1,7 @@ # anyplot.ai # waterfall-basic: Basic Waterfall Chart -# Library: Makie.jl 0.12 | Julia 1.11 -# Quality: pending | Created: 2026-08-04 +# Library: makie 0.21.9 | Julia 1.11.9 +# Quality: 88/100 | Created: 2026-08-04 using CairoMakie using Colors diff --git a/plots/waterfall-basic/metadata/julia/makie.yaml b/plots/waterfall-basic/metadata/julia/makie.yaml index ba4aaa7688..3f84e67c43 100644 --- a/plots/waterfall-basic/metadata/julia/makie.yaml +++ b/plots/waterfall-basic/metadata/julia/makie.yaml @@ -1,11 +1,8 @@ -# Per-library metadata for makie implementation of waterfall-basic -# Auto-generated by impl-generate.yml - library: makie language: julia specification_id: waterfall-basic created: '2026-08-04T11:29:00Z' -updated: '2026-08-04T11:29:00Z' +updated: '2026-08-04T11:35:06Z' generated_by: claude-sonnet workflow_run: 30904486628 issue: 777 @@ -15,7 +12,253 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/waterfall preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/waterfall-basic/julia/makie/plot-dark.png preview_html_light: null preview_html_dark: null -quality_score: null +quality_score: 88 review: - strengths: [] - weaknesses: [] + strengths: + - Correct waterfall cumulative math verified by hand (12.40 → 20.90 → 25.20 → 19.80 + → 16.70 → 14.85), with running totals labeled clearly on each bar + - Uses the Imprint style guide's theme-adaptive `neutral` semantic anchor for the + start/end Total bars — exactly the documented use case ("totals / baseline / outline + / reference line"), and it stays visually distinct from the green/red data bars + in both themes + - Dotted connecting lines between each bar satisfy the spec's "show connecting lines + to emphasize cumulative flow" requirement, and correctly link each bar's cumulative + level to the next bar's start + - Running-total labels are intelligently placed above bars for increases/totals + and below bars for decreases, avoiding any overlap with bars or connector lines + - Legend is unobtrusive (transparent background, no frame, horizontal, tucked top-left + inside the plot) and its colors correctly track theme changes for the Total swatch + - Realistic, neutral business scenario (quarterly profit bridge) with sensible dollar + magnitudes and full coverage of increase/decrease/total bar types + - 'Clean idiomatic Makie code: `barplot!` with `fillto` for floating bars, KISS + top-to-bottom structure, only used imports, correct `save("plot-$(THEME).png"; + px_per_unit=2)` API' + weaknesses: + - 'Design Excellence is solid but not yet publication-tier: no visual emphasis on + the largest swing (Operating Costs, the biggest single decrease) or a callout + on the final net profit — adding a subtle size/emphasis or a short annotation + would sharpen the story (DE-03)' + - Value labels (fontsize=13) sit close in size to the axis tick labels (fontsize=12) + with little hierarchy — bumping label fontsize up slightly (e.g. 14-15) relative + to ticks would strengthen the visual hierarchy and improve mobile-scale legibility + (VQ-01) + - Overall aesthetic is clean but fairly conventional for a waterfall chart; consider + a touch more typographic or color-depth polish (e.g. a light subtitle summarizing + the bridge, or slightly bolder connector lines) to move from 'strong' to 'exceptional' + (DE-01) + - Library Mastery is correct but generic — consider Makie-distinctive touches like + `rich()` text formatting for the value labels or a `Label` in the GridLayout for + a subtitle, which would be harder to replicate in other libraries (LM-02) + image_description: |- + Light render (plot-light.png): + Background: Warm off-white, consistent with #FAF8F1 — not pure white, not dark. + Chrome: Bold dark title "Quarterly Profit Bridge · waterfall-basic · julia · makie · anyplot.ai" centered at top, fully visible with no clipping. Y-axis label "Amount ($M)" rotated on the left in dark ink. X-axis category labels ("Starting Balance", "Product Sales", "Service Revenue", "Operating Costs", "Marketing Spend", "Taxes", "Net Profit") wrap to two lines each, dark and readable. Horizontal gridlines at 0/10/20 are subtle. Top and right spines are removed; left/bottom spines are a soft muted tone. + Data: Seven floating bars form the waterfall — first ("Starting Balance") and last ("Net Profit") bars are near-black (theme-adaptive neutral), two increase bars ("Product Sales", "Service Revenue") are Imprint brand green (#009E73), three decrease bars ("Operating Costs", "Marketing Spend", "Taxes") are matte red (#AE3030). Dotted connector lines link each bar's cumulative level to the next bar's base. Running-total dollar labels ($12.40M … $14.85M) sit above bars for increases/totals and below bars for decreases, with no overlap. A small horizontal legend (Increase/Decrease/Total) sits top-left inside the plot with a transparent background. + Legibility verdict: PASS — all title, axis, tick, and data-label text is clearly readable against the light background. + + Dark render (plot-dark.png): + Background: Warm near-black, consistent with #1A1A17 — not pure black, not light. + Chrome: Same title, now in light/cream text, fully visible with no clipping. Y-axis label and tick labels are light-colored and clearly legible. Gridlines remain subtle. Spines are a soft muted light tone matching the theme flip. + Data: The green increase bars and red decrease bars are pixel-identical to the light render (#009E73 and #AE3030 respectively) — only the chrome flipped. The Total bars (first and last) flip from near-black to near-white/cream, matching the theme-adaptive `neutral` semantic anchor definition (same hex as chrome text), which is the documented intended behavior for total/baseline series, not a compliance violation. Legend swatch for "Total" also flips to the cream color consistently. + Legibility verdict: PASS — no dark-on-dark or light-on-light failures observed; all text and data elements are clearly distinguishable from the dark background. + criteria_checklist: + visual_quality: + score: 28 + max: 30 + items: + - id: VQ-01 + name: Text Legibility + score: 7 + max: 8 + passed: true + comment: All font sizes explicitly set (titlesize, ylabelsize=14, tick sizes=12, + label fontsize=13), well-proportioned, no overflow; value labels could use + slightly more size hierarchy relative to tick labels + - id: VQ-02 + name: No Overlap + score: 6 + max: 6 + passed: true + comment: No overlap between bars, labels, connector lines, or legend + - id: VQ-03 + name: Element Visibility + score: 5 + max: 6 + passed: true + comment: Bar width (0.62) and dotted connector lines (1.5px) are visible and + well-adapted; minor room to make connectors slightly more prominent + - id: VQ-04 + name: Color Accessibility + score: 2 + max: 2 + passed: true + comment: Green/red distinction is reinforced by bar direction (step up vs + step down) and by the connector-line reference level, not color alone + - id: VQ-05 + name: Layout & Canvas + score: 4 + max: 4 + passed: true + comment: Plot fills the canvas well with balanced margins; legend sits near + the plot, nothing cut off + - id: VQ-06 + name: Axis Labels & Title + score: 2 + max: 2 + passed: true + comment: Y-axis label includes units ("Amount ($M)") + - id: VQ-07 + name: Palette Compliance + score: 2 + max: 2 + passed: true + comment: 'First series green #009E73, loss semantic anchor #AE3030 for decreases, + correct theme-adaptive `neutral` anchor for totals, correct #FAF8F1/#1A1A17 + backgrounds, all chrome theme-correct in both renders' + design_excellence: + score: 13 + max: 20 + items: + - id: DE-01 + name: Aesthetic Sophistication + score: 5 + max: 8 + passed: false + comment: Thoughtful semantic color choices and connector-line technique clearly + above defaults, but not yet full publication-level polish + - id: DE-02 + name: Visual Refinement + score: 4 + max: 6 + passed: true + comment: Top/right spines removed, subtle single-axis gridlines, transparent + frameless legend, generous whitespace + - id: DE-03 + name: Data Storytelling + score: 4 + max: 6 + passed: true + comment: Color contrast plus dotted connector lines guide the eye through + the cumulative bridge; no explicit annotation calling out the biggest swing + or final result + spec_compliance: + score: 15 + max: 15 + items: + - id: SC-01 + name: Plot Type + score: 5 + max: 5 + passed: true + comment: Correct floating-bar waterfall chart + - id: SC-02 + name: Required Features + score: 4 + max: 4 + passed: true + comment: Distinct increase/decrease colors, connecting lines, distinct total + bars, running-total labels — all present + - id: SC-03 + name: Data Mapping + score: 3 + max: 3 + passed: true + comment: Categories on X, cumulative amount on Y, all steps visible + - id: SC-04 + name: Title & Legend + score: 3 + max: 3 + passed: true + comment: Title format correct with descriptive prefix; legend labels (Increase/Decrease/Total) + match data + data_quality: + score: 15 + max: 15 + items: + - id: DQ-01 + name: Feature Coverage + score: 6 + max: 6 + passed: true + comment: Shows increases, decreases, and totals — all waterfall aspects present + - id: DQ-02 + name: Realistic Context + score: 5 + max: 5 + passed: true + comment: Neutral, plausible quarterly profit bridge scenario + - id: DQ-03 + name: Appropriate Scale + score: 4 + max: 4 + passed: true + comment: Dollar magnitudes and cumulative math are internally consistent and + realistic + code_quality: + score: 10 + max: 10 + items: + - id: CQ-01 + name: KISS Structure + score: 3 + max: 3 + passed: true + comment: Straightforward top-to-bottom script, no functions/classes + - id: CQ-02 + name: Reproducibility + score: 2 + max: 2 + passed: true + comment: Fully deterministic hardcoded data, no randomness needed + - id: CQ-03 + name: Clean Imports + score: 2 + max: 2 + passed: true + comment: CairoMakie, Colors, Printf all actively used + - id: CQ-04 + name: Code Elegance + score: 2 + max: 2 + passed: true + comment: No fake UI or over-engineering, appropriate complexity + - id: CQ-05 + name: Output & API + score: 1 + max: 1 + passed: true + comment: Correct save("plot-$(THEME).png"; px_per_unit=2) API + library_mastery: + score: 7 + max: 10 + items: + - id: LM-01 + name: Idiomatic Usage + score: 4 + max: 5 + passed: true + comment: Idiomatic use of barplot! with fillto for floating bars, Axis theming, + Legend with PolyElement handles + - id: LM-02 + name: Distinctive Features + score: 3 + max: 5 + passed: false + comment: Uses some Makie-specific features (fillto floating bars, PolyElement + custom legend, RGBAf grid alpha) but nothing that couldn't be approximated + elsewhere + verdict: REJECTED +impl_tags: + dependencies: [] + techniques: + - annotations + - custom-legend + - manual-ticks + patterns: + - data-generation + - iteration-over-groups + dataprep: + - cumulative-sum + styling: + - grid-styling + - minimal-chrome From bf58149ef6718fa36549969c0fc6bc1b64becb2f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Aug 2026 11:46:29 +0000 Subject: [PATCH 4/5] fix(makie): address review feedback for waterfall-basic Attempt 1/4 - fixes based on AI review --- .../implementations/julia/makie.jl | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/plots/waterfall-basic/implementations/julia/makie.jl b/plots/waterfall-basic/implementations/julia/makie.jl index 68178f26cb..ba3d07770d 100644 --- a/plots/waterfall-basic/implementations/julia/makie.jl +++ b/plots/waterfall-basic/implementations/julia/makie.jl @@ -93,22 +93,44 @@ half = bar_width / 2 for i in 1:(n - 1) level = running[i] lines!(ax, [i + half, i + 1 - half], [level, level]; - color = INK_SOFT, linewidth = 1.5, linestyle = :dot) + color = INK_SOFT, linewidth = 1.8, linestyle = :dot) end +# The largest single decrease gets a bolder, slightly larger label to call +# out the focal point of the bridge. +decrease_idxs = findall(i -> !is_total[i] && deltas[i] < 0, 1:n) +biggest_idx = decrease_idxs[argmax(abs.(deltas[decrease_idxs]))] +biggest_label = replace(categories[biggest_idx], "\n" => " ") + # Running total labels — above the bar for increases/totals, below for decreases label_offset = maximum(tops) * 0.035 for i in 1:n label = @sprintf("\$%.2fM", running[i]) + emphasize = i == biggest_idx + lbl_fontsize = emphasize ? 17 : 15 + lbl_font = emphasize ? :bold : :regular if is_total[i] || deltas[i] >= 0 text!(ax, i, tops[i] + label_offset; text = label, - align = (:center, :bottom), color = INK, fontsize = 13) + align = (:center, :bottom), color = INK, fontsize = lbl_fontsize, font = lbl_font) else text!(ax, i, bottoms[i] - label_offset; text = label, - align = (:center, :top), color = INK, fontsize = 13) + align = (:center, :top), color = INK, fontsize = lbl_fontsize, font = lbl_font) end end +# Subtitle annotation summarizing the bridge's focal point, set in the axis's +# relative-space headroom above the tallest bar — a Makie `rich()` touch that +# mixes weight/color within a single text object to call out the two key figures. +subtitle_rich = rich( + "Net profit reaches ", + rich(@sprintf("\$%.2fM", running[end]); color = BRAND, font = :bold), + " despite a ", + rich(@sprintf("\$%.2fM", abs(deltas[biggest_idx])); color = LOSS, font = :bold), + " $biggest_label pullback — the bridge's largest single decrease", +) +text!(ax, 0.5, 0.97; space = :relative, text = subtitle_rich, + align = (:center, :top), fontsize = 13, color = INK_SOFT) + ylims!(ax, -maximum(tops) * 0.08, maximum(tops) * 1.18) elements = [PolyElement(color = BRAND), PolyElement(color = LOSS), PolyElement(color = NEUTRAL)] From c45b6e0062c0402de9707204c5c6821c64773608 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 4 Aug 2026 11:51:05 +0000 Subject: [PATCH 5/5] chore(makie): update quality score 93 and review feedback for waterfall-basic --- .../implementations/julia/makie.jl | 2 +- .../waterfall-basic/metadata/julia/makie.yaml | 176 +++++++----------- 2 files changed, 73 insertions(+), 105 deletions(-) diff --git a/plots/waterfall-basic/implementations/julia/makie.jl b/plots/waterfall-basic/implementations/julia/makie.jl index ba3d07770d..77a084cd96 100644 --- a/plots/waterfall-basic/implementations/julia/makie.jl +++ b/plots/waterfall-basic/implementations/julia/makie.jl @@ -1,7 +1,7 @@ # anyplot.ai # waterfall-basic: Basic Waterfall Chart # Library: makie 0.21.9 | Julia 1.11.9 -# Quality: 88/100 | Created: 2026-08-04 +# Quality: 93/100 | Created: 2026-08-04 using CairoMakie using Colors diff --git a/plots/waterfall-basic/metadata/julia/makie.yaml b/plots/waterfall-basic/metadata/julia/makie.yaml index 3f84e67c43..4886e099a5 100644 --- a/plots/waterfall-basic/metadata/julia/makie.yaml +++ b/plots/waterfall-basic/metadata/julia/makie.yaml @@ -2,7 +2,7 @@ library: makie language: julia specification_id: waterfall-basic created: '2026-08-04T11:29:00Z' -updated: '2026-08-04T11:35:06Z' +updated: '2026-08-04T11:51:05Z' generated_by: claude-sonnet workflow_run: 30904486628 issue: 777 @@ -12,58 +12,40 @@ preview_url_light: https://storage.googleapis.com/anyplot-images/plots/waterfall preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/waterfall-basic/julia/makie/plot-dark.png preview_html_light: null preview_html_dark: null -quality_score: 88 +quality_score: 93 review: strengths: - - Correct waterfall cumulative math verified by hand (12.40 → 20.90 → 25.20 → 19.80 - → 16.70 → 14.85), with running totals labeled clearly on each bar - - Uses the Imprint style guide's theme-adaptive `neutral` semantic anchor for the - start/end Total bars — exactly the documented use case ("totals / baseline / outline - / reference line"), and it stays visually distinct from the green/red data bars - in both themes - - Dotted connecting lines between each bar satisfy the spec's "show connecting lines - to emphasize cumulative flow" requirement, and correctly link each bar's cumulative - level to the next bar's start - - Running-total labels are intelligently placed above bars for increases/totals - and below bars for decreases, avoiding any overlap with bars or connector lines - - Legend is unobtrusive (transparent background, no frame, horizontal, tucked top-left - inside the plot) and its colors correctly track theme changes for the Total swatch - - Realistic, neutral business scenario (quarterly profit bridge) with sensible dollar - magnitudes and full coverage of increase/decrease/total bar types - - 'Clean idiomatic Makie code: `barplot!` with `fillto` for floating bars, KISS - top-to-bottom structure, only used imports, correct `save("plot-$(THEME).png"; - px_per_unit=2)` API' + - Correct, fully-verified cumulative math (running totals match all displayed labels + exactly) + - Dotted connector lines and the bold/larger label on the largest single decrease + create real visual hierarchy and a clear narrative focal point + - rich() mixed-format subtitle is a Makie-idiomatic storytelling touch that ties + the headline numbers back into the chart + - Theme-adaptive total-bar color (INK) keeps start/end bars distinct from data bars + in both themes without introducing an off-palette color + - Canvas lands exactly on the 3200x1800 target with no clipping in either render weaknesses: - - 'Design Excellence is solid but not yet publication-tier: no visual emphasis on - the largest swing (Operating Costs, the biggest single decrease) or a callout - on the final net profit — adding a subtle size/emphasis or a short annotation - would sharpen the story (DE-03)' - - Value labels (fontsize=13) sit close in size to the axis tick labels (fontsize=12) - with little hierarchy — bumping label fontsize up slightly (e.g. 14-15) relative - to ticks would strengthen the visual hierarchy and improve mobile-scale legibility - (VQ-01) - - Overall aesthetic is clean but fairly conventional for a waterfall chart; consider - a touch more typographic or color-depth polish (e.g. a light subtitle summarizing - the bridge, or slightly bolder connector lines) to move from 'strong' to 'exceptional' - (DE-01) - - Library Mastery is correct but generic — consider Makie-distinctive touches like - `rich()` text formatting for the value labels or a `Label` in the GridLayout for - a subtitle, which would be harder to replicate in other libraries (LM-02) + - Total bars (Starting Balance, Net Profit) are colored via the ink/chrome token + rather than a dedicated categorical tone; visually distinct and legible, but leans + on a chrome color for a data-encoding role + - Design Excellence is solid but still close to the documented style-guide skeleton; + a bit more customization (e.g. a distinct total-bar hue, subtle bar corner rounding) + would push DE-01 further image_description: |- Light render (plot-light.png): - Background: Warm off-white, consistent with #FAF8F1 — not pure white, not dark. - Chrome: Bold dark title "Quarterly Profit Bridge · waterfall-basic · julia · makie · anyplot.ai" centered at top, fully visible with no clipping. Y-axis label "Amount ($M)" rotated on the left in dark ink. X-axis category labels ("Starting Balance", "Product Sales", "Service Revenue", "Operating Costs", "Marketing Spend", "Taxes", "Net Profit") wrap to two lines each, dark and readable. Horizontal gridlines at 0/10/20 are subtle. Top and right spines are removed; left/bottom spines are a soft muted tone. - Data: Seven floating bars form the waterfall — first ("Starting Balance") and last ("Net Profit") bars are near-black (theme-adaptive neutral), two increase bars ("Product Sales", "Service Revenue") are Imprint brand green (#009E73), three decrease bars ("Operating Costs", "Marketing Spend", "Taxes") are matte red (#AE3030). Dotted connector lines link each bar's cumulative level to the next bar's base. Running-total dollar labels ($12.40M … $14.85M) sit above bars for increases/totals and below bars for decreases, with no overlap. A small horizontal legend (Increase/Decrease/Total) sits top-left inside the plot with a transparent background. - Legibility verdict: PASS — all title, axis, tick, and data-label text is clearly readable against the light background. + Background: Warm off-white, consistent with #FAF8F1 + Chrome: Title "Quarterly Profit Bridge · waterfall-basic · julia · makie · anyplot.ai", rich-text subtitle, axis ticks/labels, legend (Increase/Decrease/Total) all in dark ink — all clearly readable + Data: First series (Increase) is Imprint #009E73 green; Decrease bars use semantic anchor #AE3030 red; Total bars (Starting Balance, Net Profit) are ink/near-black; dotted connector lines link cumulative levels between bars + Legibility verdict: PASS Dark render (plot-dark.png): - Background: Warm near-black, consistent with #1A1A17 — not pure black, not light. - Chrome: Same title, now in light/cream text, fully visible with no clipping. Y-axis label and tick labels are light-colored and clearly legible. Gridlines remain subtle. Spines are a soft muted light tone matching the theme flip. - Data: The green increase bars and red decrease bars are pixel-identical to the light render (#009E73 and #AE3030 respectively) — only the chrome flipped. The Total bars (first and last) flip from near-black to near-white/cream, matching the theme-adaptive `neutral` semantic anchor definition (same hex as chrome text), which is the documented intended behavior for total/baseline series, not a compliance violation. Legend swatch for "Total" also flips to the cream color consistently. - Legibility verdict: PASS — no dark-on-dark or light-on-light failures observed; all text and data elements are clearly distinguishable from the dark background. + Background: Warm near-black, consistent with #1A1A17 + Chrome: Same title/subtitle/axis/legend elements now rendered in light ink against the dark surface — no dark-on-dark issues; Total bars flip to warm off-white/cream + Data: Green (#009E73) and red (#AE3030) data bars are pixel-identical to the light render; only chrome (background, ink, total-bar color) adapts + Legibility verdict: PASS criteria_checklist: visual_quality: - score: 28 + score: 29 max: 30 items: - id: VQ-01 @@ -71,76 +53,67 @@ review: score: 7 max: 8 passed: true - comment: All font sizes explicitly set (titlesize, ylabelsize=14, tick sizes=12, - label fontsize=13), well-proportioned, no overflow; value labels could use - slightly more size hierarchy relative to tick labels + comment: All text explicitly sized and readable in both themes - id: VQ-02 name: No Overlap score: 6 max: 6 passed: true - comment: No overlap between bars, labels, connector lines, or legend + comment: No collisions between labels, connectors, subtitle, or legend - id: VQ-03 name: Element Visibility - score: 5 + score: 6 max: 6 passed: true - comment: Bar width (0.62) and dotted connector lines (1.5px) are visible and - well-adapted; minor room to make connectors slightly more prominent + comment: 7 bars well-sized and separated for sparse dataset - id: VQ-04 name: Color Accessibility score: 2 max: 2 passed: true - comment: Green/red distinction is reinforced by bar direction (step up vs - step down) and by the connector-line reference level, not color alone + comment: Green/red reinforced by legend and value labels, not sole signal - id: VQ-05 name: Layout & Canvas score: 4 max: 4 passed: true - comment: Plot fills the canvas well with balanced margins; legend sits near - the plot, nothing cut off + comment: Confirmed exact 3200x1800 canvas, no overflow - id: VQ-06 name: Axis Labels & Title score: 2 max: 2 passed: true - comment: Y-axis label includes units ("Amount ($M)") + comment: Y-axis carries units, title matches mandated format - id: VQ-07 name: Palette Compliance score: 2 max: 2 passed: true - comment: 'First series green #009E73, loss semantic anchor #AE3030 for decreases, - correct theme-adaptive `neutral` anchor for totals, correct #FAF8F1/#1A1A17 - backgrounds, all chrome theme-correct in both renders' + comment: 'First series #009E73, semantic exception for loss, correct theme + backgrounds' design_excellence: - score: 13 + score: 15 max: 20 items: - id: DE-01 name: Aesthetic Sophistication - score: 5 + score: 6 max: 8 - passed: false - comment: Thoughtful semantic color choices and connector-line technique clearly - above defaults, but not yet full publication-level polish + passed: true + comment: Custom palette, theme-adaptive total color, rich() subtitle - id: DE-02 name: Visual Refinement score: 4 max: 6 passed: true - comment: Top/right spines removed, subtle single-axis gridlines, transparent - frameless legend, generous whitespace + comment: Spines removed, subtle grid, generous whitespace - id: DE-03 name: Data Storytelling - score: 4 + score: 5 max: 6 passed: true - comment: Color contrast plus dotted connector lines guide the eye through - the cumulative bridge; no explicit annotation calling out the biggest swing - or final result + comment: Connector lines and emphasized biggest-decrease label create a clear + focal point spec_compliance: score: 15 max: 15 @@ -150,27 +123,26 @@ review: score: 5 max: 5 passed: true - comment: Correct floating-bar waterfall chart + comment: Correct waterfall/bridge chart - id: SC-02 name: Required Features score: 4 max: 4 passed: true - comment: Distinct increase/decrease colors, connecting lines, distinct total - bars, running-total labels — all present + comment: Color coding, connector lines, total bars, running-total labels all + present - id: SC-03 name: Data Mapping score: 3 max: 3 passed: true - comment: Categories on X, cumulative amount on Y, all steps visible + comment: X=category, Y=cumulative amount, all 7 steps shown - id: SC-04 name: Title & Legend score: 3 max: 3 passed: true - comment: Title format correct with descriptive prefix; legend labels (Increase/Decrease/Total) - match data + comment: Title format matches, legend labels match encoding data_quality: score: 15 max: 15 @@ -180,20 +152,19 @@ review: score: 6 max: 6 passed: true - comment: Shows increases, decreases, and totals — all waterfall aspects present + comment: Increases, decreases, totals, connectors, labels all shown - id: DQ-02 name: Realistic Context score: 5 max: 5 passed: true - comment: Neutral, plausible quarterly profit bridge scenario + comment: Plausible neutral quarterly profit-bridge scenario - id: DQ-03 name: Appropriate Scale score: 4 max: 4 passed: true - comment: Dollar magnitudes and cumulative math are internally consistent and - realistic + comment: Sensible $M-range financial values code_quality: score: 10 max: 10 @@ -203,62 +174,59 @@ review: score: 3 max: 3 passed: true - comment: Straightforward top-to-bottom script, no functions/classes + comment: Flat top-level script - id: CQ-02 name: Reproducibility score: 2 max: 2 passed: true - comment: Fully deterministic hardcoded data, no randomness needed + comment: Deterministic hardcoded data - id: CQ-03 name: Clean Imports score: 2 max: 2 passed: true - comment: CairoMakie, Colors, Printf all actively used + comment: All imports used - id: CQ-04 name: Code Elegance score: 2 max: 2 passed: true - comment: No fake UI or over-engineering, appropriate complexity + comment: Appropriate complexity, no fake UI - id: CQ-05 name: Output & API score: 1 max: 1 passed: true - comment: Correct save("plot-$(THEME).png"; px_per_unit=2) API + comment: Saves plot-$(THEME).png with current API library_mastery: - score: 7 + score: 9 max: 10 items: - id: LM-01 name: Idiomatic Usage - score: 4 + score: 5 max: 5 passed: true - comment: Idiomatic use of barplot! with fillto for floating bars, Axis theming, - Legend with PolyElement handles + comment: Idiomatic Axis/barplot!/lines!/text!/Legend composition - id: LM-02 name: Distinctive Features - score: 3 + score: 4 max: 5 - passed: false - comment: Uses some Makie-specific features (fillto floating bars, PolyElement - custom legend, RGBAf grid alpha) but nothing that couldn't be approximated - elsewhere - verdict: REJECTED + passed: true + comment: Uses rich() to mix weight/color inline for subtitle + verdict: APPROVED impl_tags: dependencies: [] techniques: - - annotations - - custom-legend - - manual-ticks + - waterfall-connectors + - value-labels + - rich-text-annotation + - conditional-emphasis patterns: - - data-generation - - iteration-over-groups - dataprep: - - cumulative-sum + - cumulative-calculation + - conditional-coloring + dataprep: [] styling: - - grid-styling - - minimal-chrome + - publication-ready + - theme-adaptive-chrome