2026-09-10 — Dark-theme dotplot side quest; note for the December overhaul
Written by Bob at the end of a short side-quest session. Nothing here is committed in either repo.
What was done (PROJ_activeattack_graphics)
Pete (ALERRT directory) asked for a high-contrast dark version of the wounded/killed-by-year dotplot. Delivered as output/bivar_wound_kill_bw.png (3000 × 2100 px, 300 dpi, 10 × 7 in) and a copy on Peter’s Desktop.
Implementation, in code/plots_cartesian.R:
generate_wound_killed_plot()gained abw = FALSEargument.bw = TRUEproduces the dark variant: black plot and panel background, white titles/axis text/axis lines, grey45 vertical gridlines, grey70 caption. Points keepattack_colors$victims(amethyst) at alpha .5 so stacked attacks glow toward lilac; the point stroke iscolorspace::lighten(attack_colors$victims, .5)(renders#E1A3F7) instead of the light-theme grey20, which would vanish on black. Arrows for the two off-scale wounded outliers use the same purple.- The combined patchwork gets
plot_annotation(theme = theme(plot.background = black))and theggsave()call usesbg = "black", so the gutter between panels matches. - Incidental fix: the function previously ignored its
dataargument and read the globalaa_data. It now uses the argument. Output unchanged (the caller passesaa_data). - The colour PNG/HTML for this plot were not regenerated; only the new
_bw.pngwas written, so no committed output churned. The dark variant was rendered from a scratch runner that sources only the setup block and this one function, not the whole script.
Iterations, for the record: first pass was black points on white (rejected: needs to be inverted); second was white points on black (rejected: bring the purple back); third used a grey85 stroke (rejected: lighter purple instead). Final is as described above.
Note for future development: native light/dark theming (site + all visualizations)
Peter’s direction, 2026-09-10, to be folded into the visual overhaul scoped for before the ALERRT conference in December 2026:
- Two variants of every plot. The dark dotplot above was well received; Pete in particular prefers dark-theme plots with high-contrast, saturated marks (points, bars, fills). The overhaul should generate a light and a dark version of every figure natively in
PROJ_activeattack_graphics, not as one-off side quests. - Whole-site light/dark toggle. activeattackdata.org should let the user switch the entire site between light and dark, and the toggle should swap the visualizations too (the PNGs, the ggiraph widgets, the map, the gif), not only the page chrome.
- Overhaul scope beyond theming: tighten and clean up the visual appearance generally, and possibly build new visualizations. Scope with Hunter (see bob.md milestone).
Implementation sketch, so the next session does not start from zero:
- Graphics side: promote today’s
bwswitch to a generaltheme = c("light", "dark")argument across all plot generators (or atheme_aa(dark = TRUE)helper + palette list in0_packages.R), writeoutput/{light,dark}/...or_darksuffixed twins, and givesave_girafe_widget()a dark variant. Keep one palette source of truth (attack_colors) and derive dark-theme strokes/greys from it (colorspace::lighten/darken). - Website side: Quarto supports dual themes natively (
theme: {light: ..., dark: ...}in_quarto.yml), which gives the navbar toggle for free. Figure swapping needs the standard.quarto-light/.quarto-darkvisibility classes on the two<img>/widget embeds, or a small JS hook, since ggiraph widgets are inline SVG+HTML and cannot be recoloured by CSS alone. - Check the GitHub Actions runner (pinned R 4.2.0) before adding
colorspaceor bumping ggiraph.
Housekeeping
- The registry line for this umbrella project (
~/.claude/bob/registry-local.md) was missing even though the 2026-09-09 orientation log says it was added; restored today. Cause unknown. - Still OPEN and awaiting Peter’s explicit approval: untrack
output/*_files/+.DS_Storein the graphics repo; remove the defunct Shiny app repo/folder. Neither was touched today.
Status at session end
Both repos committed and pushed to main with Peter’s explicit approval (graphics a93de54, website 39e25bc). The website push triggered the Quarto Publish workflow; the commit touches only bob.md and this log, so the live site is unchanged. Final dark PNG delivered to Peter’s Desktop for handoff to Pete. Registry entry restored. Session ended here; Peter switched tasks.