Regen from quality 87. Addressed:
- Canvas: figure_size/dpi were historical (16x9 @ dpi=300 -> wrong
4800x2700 output); reset to canonical figure_size=(8, 4.5), dpi=400,
width/height in ggsave per prompts/library/plotnine.md, confirmed
3200x1800 output.
- Replaced position_jitter (random scatter, caused visible overlap in
the 55-pt Medium Dose group) with a deterministic beeswarm packing
algorithm: bins each group's values and alternates left/right stacking
within a bin, producing a true lens-shaped swarm with no randomness
needed for reproducibility.
- Design excellence: explicit panel_border=element_blank() and
axis_ticks_major=element_blank() instead of relying implicitly on
theme_minimal() defaults.
- Library mastery / storytelling: added a real dashed median-to-median
trend line (geom_line + geom_point diamond on a summarized medians_df)
to make the dose-response trend explicit — a genuine distinctive
plotnine feature beyond the single stat_summary layer.
- Font sizes rescaled to the new dpi=400/figsize=(8,4.5) canvas per the
library prompt's sizing table (title 13pt, axis titles 10pt, tick
labels 8pt) — the old 24/20/16pt values were tuned for the historical
oversized canvas.
- Kept: Imprint palette (already migrated, first series #009E73),
theme-adaptive chrome, clinical dose-response data scenario,
np.random.seed(42) reproducibility, hidden legend.
Implementation:
swarm-basic- python/plotnineImplements the python/plotnine version of
swarm-basic.File:
plots/swarm-basic/implementations/python/plotnine.pyParent Issue: #974
🤖 impl-generate workflow