AI agent skill · by @huang-sir1
Radiology Figure
Produce publication-quality white-background academic figures for Radiology (RSNA), Nature-portfolio/npj, European Radiology, NEJM, Science, or Lancet-family venues with Python (matplotlib): ROC curves, calibration plots, decision-curve analysis, forest/SROC plots, Kaplan-Meier curves with numbers-at-risk, Bland-Altman, heatmaps, radiogenomics plots, graphical/visual abstracts, and annotated imaging panels. Uses The Lancet Digital Health guide as the default Lancet-series proxy. Use when the user wants figures, plot cleanup, figure-set planning, journal-specific figure formatting, or overlap/crowding QA. Outputs editable vector (.svg/.pdf) plus 300+ dpi raster, enforces de-identification and journal typography, and never invents data points.
Archived 2026-10-23 · Source updated 2026-07-27 · License: MIT. Check the original repository for the latest version.
SKILL.md instructions
# Radiology Publication Figures Use this skill to build figures that pass _Radiology_'s technical and editorial bar: correct file format and resolution, legible typography, color-blind-safe palettes, honest axes, and the specific chart types imaging-AI reviewers expect (ROC, calibration, decision-curve, forest/SROC, Kaplan-Meier, Bland-Altman), plus **de-identified** annotated imaging panels. ## Core stance - **Vector first.** Primary output is editable **`.svg`** (or `.pdf`); secondary is a **≥ 300 dpi** raster (TIFF/PNG). Keep text as text (`svg.fonttype='none'`), not outlines, so editors can re-typeset. - **One figure, one message.** Each panel answers one question; no two panels duplicate it. Panels are labelled A, B, C (_Radiology_-family) or a, b, c (Nature-family — the case is venue-dependent, never mixed within one manuscript; see "When to open extra files"). - **Honest graphics.** Axes start where the data demand (don't truncate to exaggerate); show uncertainty (CI bands, error bars); state n. - **De-identify every image.** No PHI burned into pixels, no faces/identifiers; scrub DICOM overlays; report windowing (WL/WW) and add a scale bar where size matters. - **Match the journal.** Sans-serif (Arial/Helvetica), figure width to column — _Radiology_-family single ~85 mm / double ~170 mm, **or** Nature-family single 89 mm / double 183 mm (max height 170 mm) — adequate font size at final print size (≈ 7–9 pt min). Confirm the target venue before sizing the first figure. - **Never fabricate data.** Plot only supplied/loaded values; mark simulated/example data clearly. ## When to use - Statistical figures: ROC (+ DeLong annotation), calibration, decision-curve, forest, SROC, Kaplan-Meier (with numbers-at-risk), Bland-Altman, box/violin, heatmaps/clustermaps. - Radiogenomics: MOFA/factor plots, deconvolution stacked bars, habitat maps, correlation heatmaps. - Imaging panels: multi-row montages, before/after, arrows/insets, windowing labels, scale bars. - Flow diagrams: CONSORT / STARD / PRISMA patient-selection diagrams. ## When to open extra files | File | Open when | |---|---| | [references/radiology-figure-guidelines.md](references/radiology-figure-guidelines.md) | File format, resolution, size, fonts, color, panel labelling, de-identification rules | | [references/chart-types.md](references/chart-types.md) | Choosing/parameterising the right statistical chart (ROC, calibration, DCA, forest, KM, Bland-Altman, heatmap) | | [references/imaging-panels.md](references/imaging-panels.md) | Building montages: windowing, arrows, insets, scale bars, anonymisation, panel layout | | [references/api.md](references/api.md) | The matplotlib rcParams preamble, color palette, and reusable helper functions (ROC/calibration/forest/KM) | | [references/design-theory.md](references/design-theory.md) | Typography, layout grid, color-blind-safe palettes, anti-redundancy, accessibility | | [references/color-systems.md](references/color-systems.md) | Picking ONE palette (Okabe-Ito / NPG / Morandi) and mapping color→meaning so every figure matches | | [references/survival-figures.md](references/survival-figures.md) | Kaplan-Meier integrity (curve ↔ numbers-at-risk ↔ censoring), numbers-at-risk done right, time-dependent (IPCW) ROC/calibration/DCA, incremental-value framing | | [references/figure-set-consistency.md](references/figure-set-consistency.md) | Unifying palette/fonts/axes across all figures, and cross-validating every figure number against the manuscript tables and data before export | | [references/nature-figure-spec.md](references/nature-figure-spec.md) | Target is a Nature-portfolio venue instead of _Radiology_ — column widths (89/183 mm), lowercase panel letters, RGB, legend word cap, Extended Data/Source Data display-item split | | [references/figure-intent-and-render-qa.md](references/figure-intent-and-render-qa.md) | Full figure set planning, crowded/colliding labels, DCA/KM/heatmap layout problems, final-size render review, source-data crosswalk, or premium academic visual polish | | [references/journal-family-visual-style.md](references/journal-family-visual-style.md) | Target journal family is known, the user supplied author-guide PDFs/classic articles, or the figure set needs Nature/npj or European Radiology visual taste | ## Workflow 0. **Confirm the target venue** (_Radiology_-family default, or Nature-family → nature-figure-spec.md) before sizing the first figure — column widths and panel-letter case differ and are painful to change after the set is built. 0. **For venue-specific visual taste**, open `journal-family-visual-style.md` and apply the target family's panel lettering, legend density, graphical abstract, table, and source-data conventions. 1. **For full figure sets or layout-sensitive figures**, open `figure-intent-and-render-qa.md` and create the figure intent table plus source-data crosswalk before drawing. 2. **Pick the chart for the message** (chart-types.md). Discrimination → ROC; reliability → calibration; clinical value → decision-curve; agreement → Bland-Altman; time-to-event → Kaplan-Meier; meta-analysis → forest/SROC; whole-study summary → graphical abstract. 3. **Start the script with the rcParams preamble and palette** from api.md. 4. **Build the panel(s)** with helper functions; add CI bands, n, and clear axis labels with units; label panels via `panel_letter()`/`add_panel_letter()` (api.md) with the case set for the confirmed venue — never hardcode `chr(65+i)` per script. 5. **For imaging panels**, confirm de-identification, add windowing labels + scale bar + arrows; keep grayscale unless color encodes data. 6. **Export** `.svg` (text-as-text) **and** a 300–600 dpi raster; check legibility at final print width. 7. **QA** (see contract) and inspect the final render for overlap/clipping before returning. ## Output contract 1. **`Figure plan`** — what each panel shows and why; the chart type chosen. 2. **`Figure intent / source-data crosswalk`** — for full figure sets or submission figures, show what claim each panel supports and where the data came from. 3. **`Script`** — a single runnable `.py` starting with the rcParams preamble; data inputs clearly marked (real vs example). 4. **`Files`** — `figure.svg` (primary) + `figure.png`/`.tiff` at ≥ 300 dpi. 5. **`QA notes`** — fonts embedded as text, color-blind check, axis honesty, n shown, de-identification confirmed for any image panel, final-size render checked for no overlap/clipping, and venue-family visual style checked when applicable. ## QA checklist (run before returning) - rcParams preamble present; output is `.svg` with `svg.fonttype='none'` **and** a ≥ 300 dpi raster. - Every axis labelled with units; legend present; panels labelled A/B/C or a/b/c per the confirmed venue, consistently across the whole figure set. - Uncertainty shown (CI band/error bars) and n stated. - Color-blind-safe; not reliant on red/green alone; sufficient contrast. - Imaging panels de-identified; windowing + scale bar present where relevant. - No invented data points; example data flagged. - Final exported render inspected at target size; no label/tick/legend/number overlap, clipping, or text crossing plot elements. - Venue-family rules satisfied when applicable (panel-letter case, background, legend length, graphical abstract blocks, Source Data/table expectations). ## Handoffs - The statistic behind the plot (AUC CI, DeLong, ICC, calibration metrics, net benefit) → `radiology-stats`. - Whether the figure satisfies a checklist item (flow diagram for STARD/CONSORT), or the Reporting Summary/Nature Portfolio checklist → `radiology-reporting`. - Figure legends/captions prose, display-item plan (main vs Extended Data) → `radiology-writing`. - Source Data files, Extended Data vs Supplementary Information wording → `radiology-data`. - Full figure set finished and ready for a harsh read before submission → `radiology-prereview`.