Give this skill to your agent

Copy the prompt and paste it into Claude Code, Codex or any agent that can read a web page. It installs the skill and tells you what it does.

Install this skill for me.

Read https://cwyz.com/skills/scientific-figure-making-en
The raw SKILL.md is at https://cwyz.com/api/skills/scientific-figure-making-en/raw

Save it as scientific-figure-making/SKILL.md in my skills folder (Claude Code: ~/.claude/skills/ for every project, or .claude/skills/ for this project only).

Then tell me in two sentences what it does and when it applies. Do not run anything it describes until I say so.

Or unzip the download into ~/.claude/skills/ (every project) or .claude/skills/ in your project. A skill tells an agent what to do. Read it before you install it, especially one you did not write.

Scientific Figure Making Plots Paper Figures the Way Top Venues Expect

Use when the user needs matplotlib data charts for a paper, academic talk or defense slides (grouped bars, ablation studies, training curves, heatmaps, multi-panel figures) exported as PNG or PDF vector files. It follows the publication styling of figures4papers (CC BY-NC 4.0, non-commercial use only): consistent fonts, colors, line widths and export settings, using only the user's data and asking first when something is unclear. Not for interactive charts such as Plotly, exploratory plotting, or 3D and map figures.

Use caseLet your agent draw your experiment data as bar charts, curve plots and heatmaps that follow top-venue paper figure conventions, ready to drop into a paper.

Machine translation. Read the original

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

  1. 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.
  2. Read reference files on demand. Read SKILL.md first, then open only the reference file you need from the table below. Do not read them all at once.
  3. Write these functions into your script. apply_publication_style, make_grouped_bar, finalize_figure and others are interfaces defined in references/api.md. They are not libraries you can pip install. Implement them with the signatures in api.md, or adapt the existing scripts in the figure_* folders.
  4. 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.
  5. 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.
  6. 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

  1. 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.
  2. Open tutorials.md or demos.md based on the figure type, and pick the closest figure_* example as a reference.
  3. Write the script: call apply_publication_style first, then draw the figure, and finally export to the figures/ folder with finalize_figure, using fixed file names.
  4. 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.
  5. Give the user the figure and script paths, and explain the y-axis range and the example data used.

Output Format

  1. The script path and the exported file paths (PNG, PDF, and SVG if needed).
  2. A preview of the exported figure.
  3. 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.

Done with this one? Mark it to track your path.Sign in
Save it for laterSign in
Questions about this piece?Ask AI about this

Comments (0)

No comments yet. Start the conversation.

Sign in to join the discussion.Sign in