nature-figure
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNature Figure Making Skill
Nature风格图表制作技能指南
A complete guide for producing publication-quality matplotlib figures matching Nature journal standards.
Derived from the figures4papers repository
(papers published in Nature Machine Intelligence and top ML venues), then extended with direct
visual observations from a 2026 sample spanning materials science, genomics,
neuroscience, plant biology and clinical studies.
NatureColor policy: prefer unified method families across all panels over maximal hue separation.
For dense Nature Machine Intelligence-style figure pages, use the low-saturation
family described in and reserve green/red mainly for gains, drops, and other directional cues.
NMI pastelreferences/api.md一份制作符合《Nature》期刊标准、达到出版级质量的matplotlib图表的完整指南。
本指南源自figures4papers代码仓库
(相关论文发表于Nature Machine Intelligence及顶级机器学习会议),并结合2026年《Nature》期刊中涵盖材料科学、基因组学、
神经科学、植物生物学及临床研究的样本进行了直接视觉观察后的扩展。
配色原则:优先选择所有面板统一的方法族配色,而非最大化色调区分。
对于《Nature Machine Intelligence》风格的密集图表页面,请使用中描述的低饱和度配色系列,且绿色/红色主要用于表示增益、下降及其他方向性提示。
references/api.mdNMI pastelQuick-start: Mandatory rcParams
快速入门:必选rcParams配置
Always apply these at the top of every script:
python
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Arial']
plt.rcParams['svg.fonttype'] = 'none' # editable text in SVG/PDF
plt.rcParams['font.size'] = 16 # 24 for large bar panels
plt.rcParams['axes.spines.right'] = False
plt.rcParams['axes.spines.top'] = False
plt.rcParams['axes.linewidth'] = 2.5 # 3 for big bars, 2 for compact
plt.rcParams['legend.frameon'] = FalseUse only when LaTeX is installed and math-rich labels are required.
text.usetex = True请在每个脚本开头添加以下配置:
python
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Arial']
plt.rcParams['svg.fonttype'] = 'none' # SVG/PDF中的可编辑文本
plt.rcParams['font.size'] = 16 # 大型柱状图面板使用24
plt.rcParams['axes.spines.right'] = False
plt.rcParams['axes.spines.top'] = False
plt.rcParams['axes.linewidth'] = 2.5 # 大型柱状图用3,紧凑布局用2
plt.rcParams['legend.frameon'] = False仅当已安装LaTeX且需要含大量数学公式的标签时,才使用。
text.usetex = TrueDefault operating stance
默认操作准则
- Start by classifying the requested figure into one of four archetypes:
,
quantitative grid,schematic-led composite, orimage plate + quant.asymmetric mixed-modality figure - Prefer one hero panel plus subordinate evidence panels over filling the canvas with equal-sized subplots.
- Keep the background white for plots and diagrams; switch to black only for microscopy / volume-rendering image plates.
- Prefer direct labels over legends when categories are spatially fixed or the legend would force unnecessary eye travel.
- Keep one restrained palette per figure: usually one neutral family, one signal family, and one accent family.
- When the user asks for broad style rather than ML/NMI-specific style, read
Naturebefore choosing layout.references/nature-2026-observations.md
- 首先将所需图表归类为以下四种原型之一:
、
定量网格图、示意图主导的复合图或图像面板+定量数据图。非对称多模态混合图 - 优先选择一个核心面板搭配辅助证据面板,而非用等尺寸子图填满画布。
- 图表和示意图的背景保持白色;仅在显微镜/体绘制图像面板中使用黑色背景。
- 当类别位置固定或图例会导致不必要的视线移动时,优先使用直接标签而非图例。
- 每个图表使用一套克制的配色方案:通常包含一个中性系列、一个信号系列和一个强调系列。
- 当用户要求通用的风格而非机器学习/NMI特定风格时,请先阅读
Nature再选择布局。references/nature-2026-observations.md
When to load this skill
何时启用本技能
- Matplotlib figures for papers, slides, or reports targeting Nature, NeurIPS, ICLR, or similar venues.
- Requests involving grouped bars, trend lines, heatmaps, radar plots, multi-panel grids, or PDF/SVG/high-DPI output.
- Any mention of "Nature style", "publication figure", "paper figure", or "high-quality scientific plot".
- 为目标期刊为《Nature》、NeurIPS、ICLR或同类会议的论文、幻灯片或报告制作matplotlib图表。
- 涉及分组柱状图、趋势线、热图、雷达图、多面板网格或PDF/SVG/高DPI输出的需求。
- 任何提及“Nature风格”、“出版级图表”、“论文图表”或“高质量科学绘图”的场景。
When NOT to load
何时不启用
- Plotly, Altair, Bokeh, or other interactive/web-first plotting.
- EDA-only plots without a publication target.
- Primary workflow is 3D, GIS, or non-matplotlib tooling.
- Illustrator / Figma–first layout.
- 使用Plotly、Altair、Bokeh或其他交互式/网页优先的绘图工具。
- 仅用于探索性数据分析(EDA)且无出版目标的图表。
- 主要工作流程涉及3D、GIS或非matplotlib工具。
- 以Illustrator / Figma为核心的布局工作流程。
Related files
相关文件
| File | Open when |
|---|---|
| references/design-theory.md | Typography, color theory, layout rationale, export policy |
| references/api.md | PALETTE, helper function signatures, validation rules |
| references/common-patterns.md | Ultra-wide panels, legend-only axes, print-safe bars |
| references/nature-2026-observations.md | Real |
| references/tutorials.md | End-to-end walkthroughs: bars, trends, heatmaps |
| references/chart-types.md | Radar, 3D sphere, fill_between, scatter patterns |
| 文件 | 打开场景 |
|---|---|
| references/design-theory.md | 排版、配色理论、布局原理、导出规范 |
| references/api.md | 配色方案、辅助函数签名、验证规则 |
| references/common-patterns.md | 超宽面板、仅图例轴、打印安全柱状图 |
| references/nature-2026-observations.md | 《Nature》真实页面原型:示意图主导的复合图、深色图像面板、临床三联图、非对称核心布局 |
| references/tutorials.md | 完整流程教程:柱状图、趋势图、热图 |
| references/chart-types.md | 雷达图、3D球体图、填充折线图、散点图样式 |