# Sci Figure

> Create, revise, audit, and export publication-ready SCI manuscript figures using Python or R, including multi-panel plots, source-data traceability, editable SVG/PDF output, high-resolution raster files, journal sizing, color palettes, and visual quality assurance.

- Skill: `xiao-yuling/sci-figure` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx skillmds@latest add xiao-yuling/sci-figure`
- Raw SKILL.md: https://api.skillmd.com/api/skills/xiao-yuling/sci-figure/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: xiao-yuling (https://skillmd.com/u/xiao-yuling)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/xiao-yuling/sci-figure

---

# sci-figure skill

Instructions for an AI agent that creates publication-ready scientific figures.
Use this skill for manuscript figures, SCI-style plots, multi-panel result
figures, and export bundles that need editable SVG/PDF text plus high-resolution
raster previews.

## Core workflow

Before plotting, establish a figure contract:

1. State the one-sentence conclusion the figure must support.
2. Map each panel or chart element to a distinct piece of evidence.
3. Choose a backend: Python or R. If the user has not specified one, ask:
   "Python or R?"
4. Define the output contract: final size, target formats, editable text needs,
   statistics, source-data traceability, and image-integrity concerns.
5. Style only after the scientific logic is clear.

After a backend is selected, use it exclusively for plotting, previews, exports,
and visual QA. Do not render a fallback preview with the other language.

## Default SCI style

- Use Arial as the default font for manuscript figures, with Arial-compatible math text.
- Keep text editable in SVG/PDF exports.
- Use full-box axes unless the target journal explicitly requires open axes.
- Keep all four spines visible, but place outward ticks only on the left and bottom.
- Use panel subtitles only for multi-panel figures.
- For multi-panel figures, use bold integrated titles such as `(a) Panel title`.
- For a single standalone plot, use a descriptive title without a panel letter, or omit the title if the caption and axis labels are sufficient.
- Use restrained palettes with strong grayscale legibility.
- Reserve red and green for thresholds, signed changes, gains, losses, or other directional semantics.

## Python quick start

```python
import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.rcParams.update({
    "font.family": "sans-serif",
    "font.sans-serif": ["Arial", "Helvetica", "DejaVu Sans", "sans-serif"],
    "mathtext.fontset": "custom",
    "mathtext.rm": "Arial",
    "mathtext.it": "Arial:italic",
    "mathtext.bf": "Arial:bold",
    "svg.fonttype": "none",
    "pdf.fonttype": 42,
    "font.size": 7,
    "axes.spines.right": True,
    "axes.spines.top": True,
    "axes.linewidth": 0.8,
    "axes.titleweight": "bold",
    "axes.titlesize": 8,
    "legend.frameon": False,
})

for ax in axes:
    for spine in ax.spines.values():
        spine.set_visible(True)
        spine.set_linewidth(0.8)
    ax.tick_params(direction="out", top=False, right=False, length=3, width=0.7)
```

Use LaTeX or mathtext only for scientific symbols, formulas, exponents,
subscripts, Greek letters, and mathematically formatted units. Keep ordinary
words and plain numbers outside math mode.

## R quick start

```r
library(ggplot2)

theme_set(
  theme_bw(base_size = 6.5, base_family = "Arial") +
    theme(
      panel.border = element_rect(linewidth = 0.45, colour = "black", fill = NA),
      axis.line = element_blank(),
      axis.ticks = element_line(linewidth = 0.35, colour = "black"),
      legend.title = element_text(size = 6.2),
      legend.text = element_text(size = 5.8),
      plot.title = element_text(size = 7, face = "bold", hjust = 0.5),
      panel.grid.major = element_line(linewidth = 0.2, colour = "grey88"),
      panel.grid.minor = element_blank()
    )
)
```

For R multi-panel work, use `patchwork` for layout and `svglite`, `cairo_pdf`,
or `ragg` for publication exports.

## References

- Read `references/backend-selection.md` when the backend is uncertain.
- Read `references/style-guide.md` before final styling or journal-ready export.
- Read `references/chart-patterns.md` for chart-family choices.
- Read `references/qa-checklist.md` before delivery.
## SCI single-column sizing

For single-column manuscript figures, use a final width of about 85-90 mm (3.35-3.55 in). Keep text readable at that final size:

- Axis labels: 8-9 pt.
- Tick labels: 7-8 pt.
- Legend text: 7-8 pt.
- Integrated panel titles: 9-10 pt.
- Line widths: about 1.2-1.8 pt for primary curves.
- Box/spine widths: about 0.8-1.0 pt.

Do not design a figure at double-column width and then shrink it to one column unless the text size was planned for the final printed width.


