domains / science / publication-figure-creation / scientific-visualization
The K-Dense-AI copy is a distinct, more rigorous procedure that adds non-negotiable data-integrity guardrails, a structured evidence/destination workflow, and specific Matplotlib layout/norm constraints. The other three copies are near-identical reproductions of a simpler, style-focused guide. Crowning one of the simpler copies would hide the real alternative provided by the K-Dense-AI skill, so the copies should be combined.
| Repository | Path |
|---|---|
| zLanqing/codex-claude-academic-skills | scientific-toolkit-skill/references/scientific-skills/scientific-visualization/SKILL.md |
| K-Dense-AI/scientific-agent-skills | skills/scientific-visualization/SKILL.md |
| foryourhealth111-pixel/Vibe-Skills | bundled/skills/scientific-visualization/SKILL.md |
| LeoYeAI/openclaw-master-skills | skills/scientific-visualization/SKILL.md |
| Role | Repository | Path |
|---|---|---|
| peer | zLanqing/codex-claude-academic-skills | scientific-toolkit-skill/references/scientific-skills/scientific-visualization/SKILL.md |
| peer | K-Dense-AI/scientific-agent-skills | skills/scientific-visualization/SKILL.md |
| peer | foryourhealth111-pixel/Vibe-Skills | bundled/skills/scientific-visualization/SKILL.md |
| peer | LeoYeAI/openclaw-master-skills | skills/scientific-visualization/SKILL.md |
| inferior | FreedomIntelligence/OpenClaw-Medical-Skills | skills/scientific-visualization/SKILL.md |
# Scientific Visualization
Create truthful, accessible, publication-ready scientific figures using matplotlib, seaborn, or plotly.
## Non-negotiable guardrails
- Never alter, hide, invent, or selectively enhance data to improve a figure.
- Preserve raw tables/images, exclusions, missing-value codes, analysis code, normalization, binning, image adjustments, and random seeds.
- Do not infer journal requirements. Identify the exact journal, article type, figure type, and submission phase; verify its live official guidance.
- Do not claim that a palette, DPI value, format, or automated report makes a figure accessible or journal-compliant.
- Do not silently connect missing observations, suppress inconvenient points, upsample images as if detail increased, or tune axes/dual axes to exaggerate a conclusion.
- Keep interactive and static outputs as distinct deliverables.
## Workflow
### 1. Define the evidence and destination
Record audience and medium, exact publisher/journal, article type, submission phase, intended final width, variable semantics, units, sample/replicate structure, missing/censored values, estimator and uncertainty definition, transformations, and source-data paths. If requirements are unknown, create a provisional general figure and label publisher choices as pending verification.
### 2. Choose an honest encoding
- Bars/areas: normally include zero.
- Points/lines: nonzero limits can be valid; show context and disclose breaks.
- Uncertainty: name SD, SE, CI, percentile, or posterior; state n and unit of replication.
- Raw observations: show them when feasible.
- Missing data: distinguish missing, zero, censored, and excluded.
- Area/volume: scale area/volume, not radius/diameter; avoid decorative 3D.
- Log axes: label the base/transform and declare how zero/negative values are handled.
- Binning/smoothing: record edges, bandwidth/window, method, and sensitivity.
- Normalization: state formula/reference and keep limits consistent across compared panels.
- Dual axes: prefer aligned panels; if unavoidable, justify units.
- Images: preserve originals, disclose adjustments, show scale bars.
### 3. Design accessibility in, not after
- Use color plus marker, line style, hatching, direct label, or panel separation.
- Choose qualitative, sequential, diverging, or cyclic color according to data semantics.
- Audit foreground/background contrast at the rendered size.
- Make missing and out-of-range values explicit.
- Provide alt text, a longer description for complex figures, and underlying data for web delivery.
- Treat WCAG 2.2 as web guidance: 4.5:1 normal text, 3:1 large text, and 3:1 for graphical objects required for understanding.
- Test figures in grayscale.
### 4. Implement with scoped styles
Use Matplotlib's object-oriented API and temporary style contexts:
```python
import matplotlib.pyplot as plt
from style_presets import style_context
with style_context("default", palette_name="okabe_ito_on_white"):
fig, ax = plt.subplots(figsize=(89 / 25.4, 60 / 25.4), layout="constrained")
ax.plot(x, y, marker="o", label="Observed")
ax.set(xlabel="Time (hours)", ylabel="Response (unit)")
ax.legend()
```
Do not call `tight_layout()` after using `layout="constrained"`. For exact physical dimensions, do not use `bbox_inches="tight"` unless the changed page size is intentional.
### 5. Apply publication formatting
- Raster images: 300-600 DPI.
- Line art: 600-1200 DPI or vector format.
- Vector formats preferred: PDF, EPS, SVG.
- Raster formats: TIFF, PNG (never JPEG for scientific data).
- Sans-serif fonts: Arial, Helvetica, Calibri.
- Minimum sizes at final print size: axis labels 7-9 pt, tick labels 6-8 pt, panel labels 8-12 pt (bold).
- Sentence case for labels; always include units in parentheses.
- Journal-specific widths: Nature single 89 mm, double 183 mm; Science single 55 mm, double 175 mm; Cell single 85 mm.
### 6. Export and verify
Use `figure_export.py` or equivalent to save in required formats with correct DPI. Inspect delivered files rather than trusting plotting defaults. Verify that the figure works in both color and grayscale.