light-figure

Generate publication-grade scientific figures programmatically with visual honesty gates and journal specs.

572|72|Updated Jun 7, 2026
One-click install
npx skills add https://github.com/Light0305/Light-skills --skill light-figure
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: light-figure
Source: https://github.com/Light0305/Light-skills/tree/main/skills/light-figure
Command: npx skills add https://github.com/Light0305/Light-skills --skill light-figure

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires matplotlib, numpy, pandas, seaborn, and includes scripts (resource) and assets (resource) components.

What problem does it solve?

Scientific figures often mislead readers through truncated y-axes, dual-axis pseudo-correlations, jet/rainbow colormaps, missing error bars, or by presenting non-significant results as main figures. This Skill turns figure creation into a gated, reproducible workflow where every figure is bound to a claim, meets journal column-width and font specifications, uses colorblind-safe palettes, and passes deterministic visual-honesty checks before delivery.

Core Features & Use Cases

  • Visual Honesty Gate: Static linting of plotting code detects y-axis truncation, twin axes, jet/rainbow colormaps, missing error bars, and 3D distortion as critical or warning findings.
  • Publication-Grade Export: Built-in journal specs (Nature, Science, Cell, PLOS, IEEE, Elsevier, MDPI) enforce physical column widths in mm, minimum font sizes, DPI, and vector/raster output formats.
  • Claim-Bound Figure Planning: Plan cards bind each figure to a claim with evidence strength, audit display-item budgets against venue caps, and detect redundant panels.
  • Python + R Dual Path: Detects Rscript/ggplot2 availability and renders statistical figures (forest plots, boxplots, facets) via ggplot2, with honest matplotlib fallback.
  • Use Case: After finishing result analysis, plan a figure set for a Nature submission, render colorblind-safe multi-panel figures with error bars and significance markers, then run the honesty gate and render-then-look visual QA before submission.

Quick Start

Ask the AI to plan and generate publication-grade figures for your paper claims, then run the visual honesty gate on the plotting code before exporting at the target journal's column width.

Frequently Asked Questions about light-figure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make publication-quality figures with matplotlib?

Set the figure to the target journal's physical column width in millimeters, use vector PDF output at 600 DPI, and verify scaled font sizes meet the journal minimum. The figure_export module provides save_for_journal and check_figure_size functions for journals like Nature, Science, and PLOS.

What color palette should I use for colorblind-safe scientific figures?

Use the Okabe-Ito palette for up to eight discrete categories and viridis or cividis for continuous data. Avoid jet and rainbow colormaps, which are not perceptually uniform and fail colorblind readers; add redundant encoding like line styles or markers for grayscale printing.

Can I use ggplot2 in R instead of matplotlib for paper figures?

Yes, the r_ggplot script detects whether Rscript, ggplot2, and scales are installed and renders forest plots, boxplots, and faceted figures through ggplot2 when available. If R is unavailable, it honestly degrades to matplotlib and marks the output as degraded rather than pretending to produce ggplot figures.

Why is truncating the y-axis considered misleading in bar charts?

Truncating the y-axis on bar charts exaggerates small differences because bar length encodes value proportionally. Bars must use a zero baseline; if truncation is justified, it requires a broken-axis mark and an explicit caption note, and the honesty gate flags it as critical for human review.

Does this skill support AI-generated images for paper figures?

No, all data figures must be generated programmatically with matplotlib, seaborn, R, or TikZ so they are reproducible and auditable. Generative image models are never used for research data figures, as a permanent non-negotiable rule.

What are the limitations of automated figure honesty checks?

Static linting only detects suspicious patterns like nonzero y-limits or twinx usage, not actual misleading intent, since truncation can be legitimate. Final judgment of whether a figure misleads still requires the caption plus human or reviewer evaluation.