figure-craft

Renders verified analysis results as presentation-ready figures in R, Python, or Julia.

2|Updated Jun 8, 2026
One-click install
npx skills add https://github.com/lancegui/causal-powers --skill figure-craft-lancegui
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: figure-craft
Source: https://github.com/lancegui/causal-powers/tree/main/skills/figure-craft
Command: npx skills add https://github.com/lancegui/causal-powers --skill figure-craft-lancegui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Analysis code often produces plots that run cleanly but are unreadable in a paper or on a projector: clipped labels, overlapping ticks, tiny fonts, color-only distinctions that collapse in grayscale, and lines that falsely imply continuity between discrete estimates. This Skill enforces a consistent house style and a mandatory visual self-check so every figure is legible and honest. ## Core Features & Use Cases - Cross-language house style: Applies the same principles in R/ggplot2, Python/matplotlib, and Julia/Makie — clean theme, Paul-Tol colorblind-safe palette, 16.5pt fonts, no y-axis label (the title carries it), and concise axis labels. - Chart-type decision rules: Dots plus error bars for DiD/event-study estimates with a dashed treatment line, lines for continuous series, stacked bars for composition, and guidance for distributions and scatter plots. - Black-and-white legibility: Requires redundant shape, linetype, or hatch channels so figures survive grayscale printing and colorblind readers. - Use Case: After verifying an event-study regression, ask for a coefficient plot — the Skill produces a 5x3 inch PDF saved to results/figures/ with dodged points, a dashed treatment threshold at -0.5, B&W-safe shapes, and a rendered visual check for clipping and overlap. ## Quick Start Make an event-study coefficient plot from my verified regression results and save it to results/figures/ following the house style.

Frequently Asked Questions about figure-craft

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

FAQPage Schema
How do I make an event-study plot in ggplot2?▼

Plot coefficients as dots with error bars, never a connected line, since each period is an independent estimate. Add a dashed vertical line at -0.5 for the treatment threshold, a horizontal zero line, and dodge points when groups share x-values.

What color palette is colorblind-safe for scientific figures?▼

The Paul-Tol qualitative palette is colorblind-safe and covers up to eight categories. In R use scale_color_ptol() from ggthemes; in Python or Julia set the hex codes manually, and always add shape or linetype redundancy for grayscale legibility.

Does this figure style work in Python matplotlib or only R?▼

The house style is defined by principles, not an R package, so it translates fully to matplotlib and Julia Makie. Use a white minimal theme, the Paul-Tol hex palette, 16.5pt fonts, and the same geom and annotation rules.

Why should event-study coefficients not be connected with a line?▼

A connected line implies a continuous trajectory between estimates that were computed independently period by period. Dots with error bars honestly encode point estimates plus uncertainty without inventing interpolation the data does not support.

How do I fix overlapping x-axis tick labels in a plot?▼

Reduce the number of breaks first, showing every other year or every fifth unit, since readers only need a few anchors. Rotate labels only as a last resort, and abbreviate long categorical level names in the data before plotting.

When should I not add annotations to a figure?▼

Limit inside-canvas annotations to one or two that are load-bearing, such as absolute counts on percentage bars. Metadata like sample size, data source, and p-values belongs in the LaTeX caption or notes, never rendered into the figure file.