diff --git a/plots/venn-labeled-items/implementations/julia/makie.jl b/plots/venn-labeled-items/implementations/julia/makie.jl new file mode 100644 index 0000000000..5b3aa69626 --- /dev/null +++ b/plots/venn-labeled-items/implementations/julia/makie.jl @@ -0,0 +1,127 @@ +# anyplot.ai +# venn-labeled-items: Chartgeist-Style Venn Diagram with Labeled Items +# Library: makie 0.21.9 | Julia 1.11.9 +# Quality: 85/100 | Created: 2026-06-25 + +using CairoMakie +using Colors +using Random + +Random.seed!(42) + +const THEME = get(ENV, "ANYPLOT_THEME", "light") +const PAGE_BG = THEME == "light" ? colorant"#FAF8F1" : colorant"#1A1A17" +const ELEVATED_BG = THEME == "light" ? colorant"#FFFDF6" : colorant"#242420" +const INK = THEME == "light" ? colorant"#1A1A17" : colorant"#F0EFE8" +const INK_SOFT = THEME == "light" ? colorant"#4A4A44" : colorant"#B8B7B0" +const INK_MUTED = THEME == "light" ? colorant"#6B6A63" : colorant"#A8A79F" + +const IMPRINT_PALETTE = [ + colorant"#009E73", # 1 brand green + colorant"#C475FD", # 2 lavender + colorant"#4467A3", # 3 blue + colorant"#BD8233", + colorant"#AE3030", + colorant"#2ABCCD", + colorant"#954477", + colorant"#99B314", +] + +# Circle geometry (data-unit coordinates, range 0–1) +const r = 0.25f0 +const CX_A = 0.50f0; const CY_A = 0.62f0 # top: "Goes Viral" +const CX_B = 0.325f0; const CY_B = 0.40f0 # bottom-left: "Actually Works" +const CX_C = 0.675f0; const CY_C = 0.40f0 # bottom-right: "Still Around in 5 Years" + +function circle_poly(cx, cy, r; n=200) + θ = range(0, 2π, length=n + 1) + return Point2f.(cx .+ r .* cos.(θ), cy .+ r .* sin.(θ)) +end + +const col_A = IMPRINT_PALETTE[1] # green — Goes Viral +const col_B = IMPRINT_PALETTE[2] # lavender — Actually Works +const col_C = IMPRINT_PALETTE[3] # blue — Still Around in 5 Years + +# Items: (x, y, label, overlap) — overlap: 0=outside, 1=single-circle, 2=pair, 3=triple +const items = [ + (0.50f0, 0.83f0, "NFTs", 1), + (0.50f0, 0.78f0, "Metaverse", 1), + (0.50f0, 0.73f0, "Clubhouse", 1), + (0.155f0, 0.47f0, "PostgreSQL", 1), + (0.145f0, 0.40f0, "Nginx", 1), + (0.155f0, 0.33f0, "Bash", 1), + (0.845f0, 0.47f0, "Email", 1), + (0.855f0, 0.40f0, "Excel", 1), + (0.845f0, 0.33f0, "PDF", 1), + (0.385f0, 0.58f0, "ChatGPT", 2), + (0.38f0, 0.53f0, "Figma", 2), + (0.615f0, 0.58f0, "Agile", 2), + (0.62f0, 0.53f0, "The Cloud", 2), + (0.50f0, 0.35f0, "Git", 2), + (0.50f0, 0.30f0, "Docker", 2), + (0.50f0, 0.48f0, "JavaScript", 3), + (0.15f0, 0.10f0, "Google+", 0), + (0.85f0, 0.10f0, "Vine", 0), +] + +const title_str = "Tech Taxonomy · venn-labeled-items · julia · makie · anyplot.ai" +const subtitle_str = "Going viral is easy. Actually working is hard. Surviving is rarer still." + +fig = Figure( + resolution = (1200, 1200), + fontsize = 14, + backgroundcolor = PAGE_BG, +) + +ax = Axis( + fig[1, 1]; + title = title_str, + titlesize = 20, + titlecolor = INK, + backgroundcolor = PAGE_BG, + aspect = DataAspect(), +) + +xlims!(ax, -0.15f0, 1.15f0) +ylims!(ax, -0.05f0, 1.05f0) +hidexdecorations!(ax) +hideydecorations!(ax) +hidespines!(ax) + +# Three Venn circles: semi-transparent fill + coloured outline +poly!(ax, circle_poly(CX_A, CY_A, r); + color = (col_A, 0.18f0), strokecolor = (col_A, 0.90f0), strokewidth = 2.5f0) +poly!(ax, circle_poly(CX_B, CY_B, r); + color = (col_B, 0.18f0), strokecolor = (col_B, 0.90f0), strokewidth = 2.5f0) +poly!(ax, circle_poly(CX_C, CY_C, r); + color = (col_C, 0.18f0), strokecolor = (col_C, 0.90f0), strokewidth = 2.5f0) + +# Category labels — outside each circle on its outer edge +text!(ax, CX_A, CY_A + r + 0.05f0; + text = "Goes Viral", color = col_A, + align = (:center, :bottom), fontsize = 18) +text!(ax, CX_B - r * 0.70f0 - 0.05f0, CY_B + 0.07f0; + text = "Actually\nWorks", color = col_B, + align = (:right, :center), fontsize = 18) +text!(ax, CX_C + r * 0.70f0 + 0.05f0, CY_C + 0.07f0; + text = "Still Around\nin 5 Years", color = col_C, + align = (:left, :center), fontsize = 18) + +# Editorial subtitle — below the title, above the diagram +text!(ax, 0.50f0, 0.98f0; + text = subtitle_str, color = INK_SOFT, + align = (:center, :center), fontsize = 12) + +# Item labels with visual hierarchy: larger font for items in more overlapping zones +for (x, y, label, overlap) in items + fs = overlap == 0 ? 13 : overlap == 1 ? 14 : overlap == 2 ? 15 : 16 + color = overlap == 0 ? INK_MUTED : INK + text!(ax, x, y; text = label, color = color, align = (:center, :center), fontsize = fs) +end + +# Separator for outside items +text!(ax, 0.50f0, 0.07f0; + text = "— already gone —", color = INK_MUTED, + align = (:center, :center), fontsize = 11) + +save("plot-$(THEME).png", fig; px_per_unit = 2) diff --git a/plots/venn-labeled-items/metadata/julia/makie.yaml b/plots/venn-labeled-items/metadata/julia/makie.yaml new file mode 100644 index 0000000000..f3e6f3818d --- /dev/null +++ b/plots/venn-labeled-items/metadata/julia/makie.yaml @@ -0,0 +1,277 @@ +library: makie +language: julia +specification_id: venn-labeled-items +created: '2026-06-25T11:43:06Z' +updated: '2026-06-25T12:04:48Z' +generated_by: claude-sonnet +workflow_run: 28166938084 +issue: 5364 +language_version: 1.11.9 +library_version: 0.21.9 +preview_url_light: https://storage.googleapis.com/anyplot-images/plots/venn-labeled-items/julia/makie/plot-light.png +preview_url_dark: https://storage.googleapis.com/anyplot-images/plots/venn-labeled-items/julia/makie/plot-dark.png +preview_html_light: null +preview_html_dark: null +quality_score: 85 +review: + strengths: + - 'Perfect spec compliance: all 7 interior Venn zones populated plus outside zone, + 18 items in the 10-25 range, semi-transparent circle fills, category labels positioned + outside each circle, and editorial separator ''— already gone —'' for outside + items' + - 'Full theme-adaptive chrome: INK/INK_SOFT/INK_MUTED/PAGE_BG tokens correctly wired + to both renders — no dark-on-dark failure in dark theme, background colors are + correct warm off-white and near-black' + - 'Genuine editorial voice and visual hierarchy: witty subtitle, font-size scaled + by overlap level (single=14, pair=15, triple=16), muted color for outside items, + and ''Tech Taxonomy'' framing echo the Chartgeist magazine aesthetic the spec + requested' + - 'Clean, idiomatic Makie code: KISS structure with one helper function (circle_poly), + proper Random.seed!(42), correct DataAspect() for equal-proportion circles, and + canonical save pattern' + weaknesses: + - Category label 'Actually Works' (right-aligned, left of diagram) sits very close + to item label 'PostgreSQL' — minor horizontal crowding; nudge the category label + further left (e.g. CX_B - r*0.85 - 0.05) or add a small y-offset to 'PostgreSQL' + to add breathing room + - The 'Still Around in 5 Years' category label on the right is placed close to the + canvas boundary; extend xlims to (-0.15, 1.25) or shift the label text anchor + slightly inward (right-align at CX_C + r*0.60 + 0.05) to add a comfortable margin + - LM-02 (Library Mastery / Distinctive Features) is modest — the implementation + uses basic Makie primitives (poly!, text!) but doesn't leverage anything distinctively + Makie-specific beyond DataAspect(); using Makie's Legend, custom recipe, or Observable-driven + scatter overlay would improve this + - Subtitle at fontsize=12 renders at effectively ~24 source-px, which becomes barely + legible when the catalog thumbnails are scaled to 400px mobile width — raise subtitle + to fontsize=13 or 14 for margin at mobile scale + image_description: |- + Light render (plot-light.png): + Background: warm off-white (#FAF8F1) — correct, not pure white + Chrome: Title "Tech Taxonomy · venn-labeled-items · julia · makie · anyplot.ai" in dark INK (#1A1A17), clearly readable; subtitle in muted INK_SOFT tone, readable; no axis labels or ticks (appropriate for Venn) + Data: Three overlapping circles — green (#009E73, top "Goes Viral"), lavender (#C475FD, bottom-left "Actually Works"), blue (#4467A3, bottom-right "Still Around in 5 Years") — all with semi-transparent fills (alpha≈0.18) showing overlap regions; item labels in dark INK distributed across all 7 zones plus outside; "— already gone —" separator below Google+ and Vine in muted color + Legibility verdict: PASS — all text readable; minor crowding between "Actually Works" category label and "PostgreSQL" item label at left side; "Still Around in 5 Years" label close to right canvas edge but no pixels clipped + + Dark render (plot-dark.png): + Background: warm near-black (#1A1A17) — correct, not pure black + Chrome: Title in light INK (#F0EFE8), clearly readable against dark background; subtitle in light muted tone; all item labels render in light INK — no dark-on-dark failure observed; category labels in their respective Imprint colors (green, lavender, blue) all clearly visible + Data: Circle data colors identical to light render — green, lavender, blue fills and outlines unchanged, confirming only chrome flipped between themes; item labels (INK = #F0EFE8 in dark mode) readable throughout all zones including overlapping regions + Legibility verdict: PASS — both renders fully legible; no dark-on-dark failures; Imprint palette data colors are identical between themes as required + criteria_checklist: + visual_quality: + score: 26 + max: 30 + items: + - id: VQ-01 + name: Text Legibility + score: 6 + max: 8 + passed: true + comment: Font sizes explicitly set (titlesize=20, category=18, items=13-16, + subtitle=12); all text readable in both themes; subtitle at 12pt approaches + minimum for mobile scaling + - id: VQ-02 + name: No Overlap + score: 5 + max: 6 + passed: true + comment: Minor crowding between 'Actually Works' category label and 'PostgreSQL' + item on left side; no outright text collision but spacing is tighter than + ideal + - id: VQ-03 + name: Element Visibility + score: 6 + max: 6 + passed: true + comment: All three Venn circles clearly visible with strokewidth=2.5 outlines; + semi-transparent fills show overlapping regions; all 18 item labels distinguishable + - id: VQ-04 + name: Color Accessibility + score: 2 + max: 2 + passed: true + comment: Three distinct Imprint hues (green/lavender/blue) with sufficient + separation; no red-green sole-signal use; item text in full-contrast INK + tokens + - id: VQ-05 + name: Layout & Canvas + score: 3 + max: 4 + passed: true + comment: Square 2400x2400 canvas correct for symmetric Venn layout; good centering + and whitespace; 'Still Around in 5 Years' label sits close to right canvas + boundary (no clipping, but minimal breathing room) + - id: VQ-06 + name: Axis Labels & Title + score: 2 + max: 2 + passed: true + comment: Title in correct format 'Tech Taxonomy · venn-labeled-items · julia + · makie · anyplot.ai'; no traditional axis labels appropriate for Venn diagram + - id: VQ-07 + name: Palette Compliance + score: 2 + max: 2 + passed: true + comment: 'First circle = #009E73 (brand green); circles 2-3 use Imprint positions + 2 and 3 (lavender, blue) in canonical order; PAGE_BG correct for both themes; + data colors theme-invariant' + design_excellence: + score: 13 + max: 20 + items: + - id: DE-01 + name: Aesthetic Sophistication + score: 5 + max: 8 + passed: true + comment: Editorial framing with 'Tech Taxonomy' title and witty subtitle; + visual hierarchy via font-size-by-overlap-level is a thoughtful design choice; + Imprint palette applied cleanly; doesn't reach full sophistication but clearly + above generic defaults + - id: DE-02 + name: Visual Refinement + score: 4 + max: 6 + passed: true + comment: All spines, ticks, and decorations hidden (hidespines!, hidexdecorations!, + hideydecorations!); no grid (correct for Venn); generous whitespace; circles + rendered cleanly with stroke and fill + - id: DE-03 + name: Data Storytelling + score: 4 + max: 6 + passed: true + comment: Items chosen (NFTs/Metaverse/Clubhouse viral-only; Git/Docker practical-survivors; + JavaScript in center) tell a coherent tech-longevity story; '— already gone + —' separator for outside items is a genuine editorial touch; visual hierarchy + reinforces the overlap narrative + spec_compliance: + score: 15 + max: 15 + items: + - id: SC-01 + name: Plot Type + score: 5 + max: 5 + passed: true + comment: Three-circle Venn diagram with labeled items in zones; editorial/Chartgeist + style as specified + - id: SC-02 + name: Required Features + score: 4 + max: 4 + passed: true + comment: 'Semi-transparent fills; category names outside circles on outer + sides; item labels in correct zones; 18 items (spec: 10-25); outside zone + populated with Google+ and Vine; separator text for outside items' + - id: SC-03 + name: Data Mapping + score: 3 + max: 3 + passed: true + comment: 'All 7 interior zones populated (A: NFTs/Metaverse/Clubhouse, B: + PostgreSQL/Nginx/Bash, C: Email/Excel/PDF, AB: ChatGPT/Figma, AC: Agile/The + Cloud, BC: Git/Docker, ABC: JavaScript); outside: Google+/Vine' + - id: SC-04 + name: Title & Legend + score: 3 + max: 3 + passed: true + comment: Title 'Tech Taxonomy · venn-labeled-items · julia · makie · anyplot.ai' + matches required format with descriptive prefix; category labels serve as + legend + data_quality: + score: 15 + max: 15 + items: + - id: DQ-01 + name: Feature Coverage + score: 6 + max: 6 + passed: true + comment: All 7 interior zones plus outside covered; diverse distribution across + zones; both pairwise and triple overlaps represented + - id: DQ-02 + name: Realistic Context + score: 5 + max: 5 + passed: true + comment: Tech taxonomy is relatable, plausible, and neutral; items (NFTs, + ChatGPT, Git, JavaScript, etc.) are recognizable contemporary tech references; + not controversial + - id: DQ-03 + name: Appropriate Scale + score: 4 + max: 4 + passed: true + comment: 18 items within 10-25 spec range; distribution feels balanced across + zones without overcrowding any single region + code_quality: + score: 10 + max: 10 + items: + - id: CQ-01 + name: KISS Structure + score: 3 + max: 3 + passed: true + comment: Single-level script; only one helper function (circle_poly) which + is necessary and compact; no unnecessary abstraction + - id: CQ-02 + name: Reproducibility + score: 2 + max: 2 + passed: true + comment: Random.seed!(42) present; all data is deterministic constants + - id: CQ-03 + name: Clean Imports + score: 2 + max: 2 + passed: true + comment: CairoMakie, Colors, Random — all three used; no unused imports + - id: CQ-04 + name: Code Elegance + score: 2 + max: 2 + passed: true + comment: Clean iteration over items list; parametric circle generation is + elegant; color tuples for alpha blending are idiomatic Makie + - id: CQ-05 + name: Output & API + score: 1 + max: 1 + passed: true + comment: Saves as plot-$(THEME).png with px_per_unit=2; no bare plot.png + library_mastery: + score: 6 + max: 10 + items: + - id: LM-01 + name: Idiomatic Usage + score: 4 + max: 5 + passed: true + comment: Uses poly! for polygon shapes, text! for labels, hidespines!/hidexdecorations!/hideydecorations!, + DataAspect(), xlims!/ylims! — all idiomatic Makie patterns; theme-adaptive + color tokens correctly applied + - id: LM-02 + name: Distinctive Features + score: 2 + max: 5 + passed: false + comment: Uses basic Makie primitives (poly!, text!) without leveraging distinctively + Makie-specific features like the Observable system, custom recipes, or Legend + — implementation could work in any vector graphics library + verdict: APPROVED +impl_tags: + dependencies: [] + techniques: + - annotations + - patches + patterns: + - data-generation + - iteration-over-groups + dataprep: [] + styling: + - minimal-chrome + - alpha-blending