Scientific Figure Making Plots Paper Figures the Way Top Venues Expect
When the user needs a data chart for a paper, an academic talk or defense slides, write a matplotlib script that follows the conventions in the scientific-figure-making skill from the figures4papers repository. The author is a computer science PhD student at Yale University. The repository collects the plotting scripts the author used for their own papers in journals and conferences such as Nature Machine Intelligence, ICML, NeurIPS and ECCV. The skill turns the styling and export habits from those scripts into rules. The repository is licensed under CC BY-NC 4.0, which allows non-commercial use only, and requires attribution.
Triggers
The user asks for things like "Make a figure for my paper," "Turn these experiment results into a bar chart," "Make an ablation study figure," "Plot the training curves," "Export a vector PDF for my submission," or "Use the same style as figures4papers."
Not for:
- Interactive charts or web visualizations (Plotly, Altair, Bokeh).
- Exploratory plots that only help the user look at the data and are not meant for a paper yet.
- Figures that are mainly 3D or maps.
- Schematics and infographics laid out in Illustrator or Figma.
Hard Rules
- Use only the data the user gives. Do not fill in missing numbers, and do not invent or "polish" results. If data is missing, ask. Dummy data in a schematic must be labeled as an example, both in the script and in your reply.
- Read reference files on demand. Read
SKILL.mdfirst, then open only the reference file you need from the table below. Do not read them all at once. - Write these functions into your script.
apply_publication_style,make_grouped_bar,finalize_figureand others are interfaces defined inreferences/api.md. They are not libraries you canpip install. Implement them with the signatures in api.md, or adapt the existing scripts in thefigure_*folders. - Ask when key details are unclear. Which groups to compare, how many panels, which method is "our method," the resolution, and the data format all change how the figure looks. Confirm them with the user before you start.
- Say so when the y-axis does not start at 0. The style allows the y-axis to be tightened to the range of the data so differences are visible. Tell the user in your reply, and state it in the caption when needed, so readers do not misjudge the gap.
- Tell the user about the license. If the user plans to use the repository's scripts or figures in a commercial product or a paid course, remind them that CC BY-NC 4.0 does not allow commercial use.
Installation
Check first:
ls ~/.claude/skills/scientific-figure-making/SKILL.md 2>/dev/null && echo "installed" || echo "not installed"
If it is not installed, tell the user where the repository will be cloned and where the link will go. Once they agree, run:
git clone https://github.com/ChenLiu-1996/figures4papers.git ~/figures4papers
mkdir -p ~/.claude/skills
ln -s ~/figures4papers/scientific-figure-making ~/.claude/skills/scientific-figure-making
For Codex, replace ~/.claude/skills in the last two lines with ~/.codex/skills. For Cursor, use ~/.cursor/skills. Restart the agent after installing so it can find the skill. To update, run git pull inside ~/figures4papers.
If you do not want to install it, open the repository in your agent and read scientific-figure-making/SKILL.md by its path.
Runtime requirements: Python 3, matplotlib and numpy. Turn on use_tex only when a label has complex formulas, since it needs a local LaTeX install.
Reference Files
| File | When to open it |
|---|---|
references/tutorials.md |
Full steps for building a bar chart, trend chart or heatmap from scratch |
references/api.md |
Function signatures, the PALETTE colors, and parameter validation rules |
references/common-patterns.md |
Very wide canvases, separate legend panels, bars that work in black-and-white print |
references/design-theory.md |
The reasons behind the font, export and color choices |
references/demos.md |
Links to the example figure_* scripts in the repository |
Style Essentials
| Aspect | Rule |
|---|---|
| Font | Sans-serif, in the order Arial, Helvetica, DejaVu Sans. Use size 24 for large comparison bar charts and 15 to 16 for compact subplots |
| Axes | Remove the top and right spines. Axis lines are 2 to 3 wide, and 3 for large figures |
| Colors | Dark blue #0F4D92 for the proposed method or key result. Green shades for improvements. Red-pink shades for comparison methods. Gray #CFCECE for baselines and background |
| Legend | No frame. When there are many curves or groups, use a separate subplot with its axes turned off to hold the legend |
| Bar charts | Black edges (line width 1.5 to 3), with the value labeled directly above each bar. Ablation studies use the same blue at different opacities. For black-and-white print, add hatching or dotted fills |
| Curves | 2 to 4 main curves per subplot, line width 2 to 3. Use fill_between for shaded uncertainty ranges. Avoid grids where possible |
| Layout | For 3 to 4 metrics in one row, use a very wide canvas (3 to 4 times as wide as it is tall). Keep font size, line width and color meanings consistent across subplots in the same row |
| Export | 300 dpi, or 600 dpi for dense bar charts. Export both PNG and PDF. For SVG, set svg.fonttype = 'none' to keep text editable. In a headless environment, call matplotlib.use("Agg") first |
Workflow
- Ask what the figure is for (main paper, supplementary material or slides), what the data is, and what it is compared against. Confirm which one is the user's own method.
- Open
tutorials.mdordemos.mdbased on the figure type, and pick the closestfigure_*example as a reference. - Write the script: call
apply_publication_stylefirst, then draw the figure, and finally export to thefigures/folder withfinalize_figure, using fixed file names. - Run the script and open the exported PNG to check. Look for overlapping or cut-off text, legends that cover data, and whether the colors match what the user's method is.
- Give the user the figure and script paths, and explain the y-axis range and the example data used.
Output Format
- The script path and the exported file paths (PNG, PDF, and SVG if needed).
- A preview of the exported figure.
- The color-to-method mapping, the y-axis range, and any data the user still needs to provide.
In One Line
Ask about the data and what it is compared against first, write the matplotlib script to these conventions, then export PNG and PDF and check the result yourself before handing it over.

Comments (0)
No comments yet. Start the conversation.