$npx -y skills add scdenney/open-science-skills --skill figuresDesign and format publication-quality figures. Use for chart choice, color, scales, legends, captions, accessibility, and reproducible figure workflows.
| 1 | # Figure Designer |
| 2 | |
| 3 | ## Heritage and scope |
| 4 | |
| 5 | This is an original Open Science Skills workflow for figure production in social-science manuscripts. It is general — apply to any figure type (line, bar, point, density, map, network, small multiples). For figures whose interpretation depends on method-specific standards, also consult the relevant sibling skill (`conjoint-design`, `conjoint-diagnostics`, `list-experiment`, `topic-modeling`, `text-classification`, `vlm-ocr-pipeline`). For end-stage QA on a finished figure set, hand off to `figure-table-audit`. |
| 6 | |
| 7 | A good figure earns its place in the manuscript: it makes a single comparison legible, it can be read without the surrounding text, and it can be regenerated from a script. If a figure cannot do all three, it is not yet ready. |
| 8 | |
| 9 | ## Instructions |
| 10 | |
| 11 | ### 1. State the comparison before drawing |
| 12 | |
| 13 | Write down, in one sentence, what the figure is supposed to let the reader see. Examples: |
| 14 | |
| 15 | - "Treatment effect is larger among low-information respondents than among high-information respondents." |
| 16 | - "Vote share for Party A declines monotonically with district urbanization." |
| 17 | - "Topic 7 prevalence rises sharply after the 2024 election." |
| 18 | |
| 19 | If you cannot state the comparison in one sentence, the figure has too many goals — split it into multiple panels or multiple figures. |
| 20 | |
| 21 | ### 2. Choose the chart type from the comparison |
| 22 | |
| 23 | Match the geometry to the comparison, not to the data type: |
| 24 | |
| 25 | - **Comparing magnitudes across a small number of categories**: bar chart (or dot/lollipop for many categories). |
| 26 | - **Tracking a quantity over a continuous variable**: line chart for ordered/continuous x; point + ribbon for uncertainty. |
| 27 | - **Showing distribution**: histogram (single), density (compare a few), boxplot/violin (compare many). |
| 28 | - **Showing relationship between two continuous variables**: scatter, with trend line + uncertainty band if a model is implied. |
| 29 | - **Showing effect estimates**: coefficient plot (point + CI), preferred over tables for visual comparison across models. |
| 30 | - **Showing many small comparisons**: small multiples (faceting) on a shared scale, not multiple separate figures. |
| 31 | |
| 32 | Avoid pie charts, 3D anything, dual-axis, and donut charts in academic figures. |
| 33 | |
| 34 | ### 3. Pick scales and axes deliberately |
| 35 | |
| 36 | - Always label both axes with the quantity AND the units. "Income" is wrong; "Household income (USD, 2020)" is right. |
| 37 | - For percentages, write `0.00–1.00` or `0%–100%` consistently — do not mix within a figure. |
| 38 | - Use a log scale when the data span more than two orders of magnitude OR when a multiplicative effect is the substantive story; label the scale as log. |
| 39 | - Anchor axes at zero ONLY when the zero is meaningful for the comparison (counts, proportions). For deviations, differences, and z-scores, do not force a zero baseline. |
| 40 | - Use the same y-axis range across panels of small multiples unless the claim is explicitly about within-panel scale. |
| 41 | - Reverse the y-axis only when the substantive direction demands it (e.g., rank where 1 is "best") and label the reversal in the caption. |
| 42 | |
| 43 | ### 4. Choose color with intent |
| 44 | |
| 45 | - **Sequential** (light → dark): for ordered/quantitative variables (income brackets, time, density). |
| 46 | - **Diverging** (red ↔ blue, etc.): for variables with a meaningful midpoint (effect sign, deviation from baseline). |
| 47 | - **Categorical**: for unordered groups; use a colorblind-safe palette (Okabe-Ito, viridis discrete, ColorBrewer Set2/Dark2). |
| 48 | - Test grayscale: convert the figure and check that the comparison still reads. If it does not, add shape, line type, or direct labels. |
| 49 | - Do not encode the same variable in both color and shape unless reinforcing for accessibility — that is fine; just keep the legend honest. |
| 50 | - Default `rainbow` / `jet` ramps are a publication smell; replace them. |
| 51 | |
| 52 | ### 5. Match legend order to the visual order in the chart |
| 53 | |
| 54 | Legends are read alongside the plot, so the legend order must mirror the data's visual order — readers should never have to scan back and forth to decode a series: |
| 55 | |
| 56 | - For lines, areas, or stacked elements arranged top-to-bottom in the plot at the rightmost x-value, list legend entries in the same top-to-bottom order. |
| 57 | - For bars or categories arranged left-to-right, use a horizontal legend listed left-to-right in the same order. |
| 58 | - For panels (small multiples), follow the panel grid: rows top-to-bottom, columns left-to-right. |
| 59 | - Do NOT alphabetize the legend when the data have a natural order (time, magnitude, treatment intensity, ordinal scale). Alphabetical legends are a frequent cause of misreading. |
| 60 | - Prefer **direct labeling** at the line end / bar end when there are five or fewer series — a labelled line beats any legend. |
| 61 | - When a legend is unavoidable, place it where it does not occlude data, and match colors and line styles between figure and legend |