{"spec_id":"line-filled","library":"makie","language":"julia","code":"# anyplot.ai\n# line-filled: Filled Line Plot\n# Library: makie 0.21.9 | Julia 1.11.9\n# Quality: 89/100 | Created: 2026-09-05\n\nusing CairoMakie\nusing Colors\nusing Random\n\nRandom.seed!(42)\n\n# --- Theme tokens -----------------------------------------------------------\nconst THEME    = get(ENV, \"ANYPLOT_THEME\", \"light\")\nconst PAGE_BG  = THEME == \"light\" ? colorant\"#FAF8F1\" : colorant\"#1A1A17\"\nconst INK      = THEME == \"light\" ? colorant\"#1A1A17\" : colorant\"#F0EFE8\"\nconst INK_SOFT = THEME == \"light\" ? colorant\"#4A4A44\" : colorant\"#B8B7B0\"\nconst IMPRINT_PALETTE = [\n    colorant\"#009E73\", colorant\"#C475FD\", colorant\"#4467A3\", colorant\"#BD8233\",\n    colorant\"#AE3030\", colorant\"#2ABCCD\", colorant\"#954477\", colorant\"#99B314\",\n]\nconst BRAND = IMPRINT_PALETTE[1]\n\n# --- Data ---------------------------------------------------------------\ndays = 0:119\ntrend = 40.0 .+ 0.6 .* days\nseasonal = 8.0 .* sin.(2π .* days ./ 30)\nnoise = 5.0 .* randn(length(days))\ndaily_active_users = max.(trend .+ seasonal .+ noise, 2.0)\n\n# --- Plot -----------------------------------------------------------------\nfig = Figure(\n    resolution      = (1600, 900),\n    fontsize        = 14,\n    backgroundcolor = PAGE_BG,\n)\n\nax = Axis(\n    fig[1, 1];\n    title              = \"line-filled · julia · makie · anyplot.ai\",\n    titlesize          = 20,\n    titlecolor         = INK,\n    xlabel             = \"Day Since Launch\",\n    ylabel             = \"Daily Active Users (thousands)\",\n    xlabelsize         = 14,\n    ylabelsize         = 14,\n    xlabelcolor        = INK,\n    ylabelcolor        = INK,\n    xticklabelsize     = 12,\n    yticklabelsize     = 12,\n    xticklabelcolor    = INK_SOFT,\n    yticklabelcolor    = INK_SOFT,\n    xtickcolor         = INK_SOFT,\n    ytickcolor         = INK_SOFT,\n    backgroundcolor    = PAGE_BG,\n    topspinevisible    = false,\n    rightspinevisible  = false,\n    leftspinecolor     = INK_SOFT,\n    bottomspinecolor   = INK_SOFT,\n    xgridvisible       = false,\n    ygridcolor         = RGBAf(INK.r, INK.g, INK.b, 0.12),\n    yminorgridvisible  = false,\n)\n\ny_top = maximum(daily_active_users) * 1.18\n\nband!(ax, days, zeros(length(days)), daily_active_users; color = (BRAND, 0.35))\nlines!(ax, days, daily_active_users; color = BRAND, linewidth = 2.0)\nylims!(ax, 0, y_top)\n\n# Callout marking the peak day, giving the chart a storytelling focal point.\n# Drawn last so it sits on top of the fill and line (Makie/Cairo painter's\n# order = plot-call order).\npeak_idx = argmax(daily_active_users)\npeak_day = days[peak_idx]\npeak_value = daily_active_users[peak_idx]\nscatter!(ax, [peak_day], [peak_value]; color = BRAND, markersize = 18,\n    strokewidth = 2.5, strokecolor = PAGE_BG)\ntext!(ax, peak_day, peak_value;\n    text = \"Peak: $(round(Int, peak_value))k DAU\",\n    align = (:right, :bottom), offset = (-14, 12),\n    color = INK, fontsize = 15)\n\n# --- Save -------------------------------------------------------------------\nsave(\"plot-$(THEME).png\", fig; px_per_unit = 2)\n"}