publication-figures-guide
Create journal-quality scientific figures with proper styling and accessibility
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Create journal-quality scientific figures with proper styling and accessibility
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
公司金融实证研究的"漏斗式选题查找器"。互动开场先后询问 (1) 研究方向、(2) 候选标题数量 N, 再扫描全球文献(已出版英文学术期刊 + SSRN working paper + 全球高校 department seminar 1 年内日程),基于 Edmans (2024) "1000 Rejections" 红线生成 N 个候选标题,**通过并行 subagent(Agent 工具)批量生成计划书 + 查新;每个 subagent 必须强制调用 Skill 工具加载 econfin-proposal 与 novelty-check 两个预设 skill 完成各自模块**,**只有当 novelty score >= 9 时(即 JF/JFE/RFS 顶刊层次),subagent 才把 proposal + 查新报告合并的 md 写入 F:\Dropbox\CC\选题大全\<研究方向短名>\(以"简短选题名称-分数"命名,子文件夹名由 Step 0 从用户输入的研究方向派生);< 9 分的选题在 subagent 内部直接丢弃,绝不写盘、绝不输出**。当用户说"找选题"、"帮我找选题"、"想做 X 方向"、 "empirical CF idea search"、"批量生成研究计划书"、"100 ideas"、"econfin-idea-finder" 时触发。
Create and compile beautiful Beamer presentations following the Rhetoric of Decks philosophy. Use when making slides, creating decks, or compiling .tex presentation files.
Scaffold a new research project with standard directory structure, CLAUDE.md template, and documented README. Use this at the start of every new project to ensure consistent organization.
Download, split, and deeply read academic PDFs. Use when asked to read, review, or summarize an academic paper. Splits PDFs into 4-page chunks, reads them in small batches, and produces structured reading notes — avoiding context window crashes and shallow comprehension.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
| name | publication-figures-guide |
| description | Create journal-quality scientific figures with proper styling and accessibility |
| metadata | {"openclaw":{"emoji":"🎨","category":"analysis","subcategory":"dataviz","keywords":["scientific figure creation","publication quality figure","figure standards","colorblind-friendly palette","data visualization"],"source":"wentor"}} |
A skill for creating publication-quality scientific figures that meet journal standards for resolution, formatting, accessibility, and visual clarity. Covers matplotlib, seaborn, and ggplot2 workflows with journal-ready export settings.
| Requirement | Typical Spec | Notes |
|---|---|---|
| Resolution | 300-600 DPI | 300 DPI minimum for print |
| File format | PDF, EPS, TIFF | Vector (PDF/EPS) preferred |
| Color mode | CMYK for print, RGB for online | Check journal spec |
| Max width | Single column: 3.3in / Double: 6.7in | Varies by journal |
| Font size | 6-8pt minimum | Must be legible at final print size |
| Line width | 0.5-1.5pt | Thin lines may not reproduce |
| File size | Varies (often <10MB per figure) | TIFF can be large |
import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
def setup_publication_style(journal: str = 'nature'):
"""
Configure matplotlib for publication-quality figures.
"""
styles = {
'nature': {
'figure.figsize': (3.3, 2.5), # single column
'font.size': 7,
'font.family': 'sans-serif',
'font.sans-serif': ['Arial', 'Helvetica'],
'axes.linewidth': 0.5,
'axes.labelsize': 8,
'xtick.labelsize': 7,
'ytick.labelsize': 7,
'legend.fontsize': 6,
'lines.linewidth': 1.0,
'lines.markersize': 4,
'savefig.dpi': 300,
'savefig.bbox': 'tight',
'savefig.pad_inches': 0.05,
},
'ieee': {
'figure.figsize': (3.5, 2.6),
'font.size': 8,
'font.family': 'serif',
'font.serif': ['Times New Roman', 'Times'],
'axes.linewidth': 0.5,
'axes.labelsize': 9,
'xtick.labelsize': 8,
'ytick.labelsize': 8,
'legend.fontsize': 7,
'lines.linewidth': 1.0,
'savefig.dpi': 300,
},
'acs': {
'figure.figsize': (3.25, 2.5),
'font.size': 7,
'font.family': 'sans-serif',
'font.sans-serif': ['Arial'],
'axes.linewidth': 0.5,
'savefig.dpi': 600,
}
}
style = styles.get(journal, styles['nature'])
mpl.rcParams.update(style)
return style
setup_publication_style('nature')
def get_accessible_palette(n_colors: int = 8, style: str = 'categorical') -> list:
"""
Return colorblind-friendly palettes.
"""
palettes = {
'categorical': {
# Wong (2011) Nature Methods palette
3: ['#0072B2', '#D55E00', '#009E73'],
4: ['#0072B2', '#D55E00', '#009E73', '#CC79A7'],
5: ['#0072B2', '#D55E00', '#009E73', '#CC79A7', '#F0E442'],
8: ['#0072B2', '#D55E00', '#009E73', '#CC79A7',
'#F0E442', '#56B4E9', '#E69F00', '#000000']
},
'sequential': {
# Viridis-based (perceptually uniform)
'cmap': 'viridis' # Also: 'cividis', 'inferno', 'magma'
},
'diverging': {
'cmap': 'RdBu_r' # Also: 'coolwarm', 'BrBG'
}
}
if style == 'categorical':
n = min(n_colors, 8)
return palettes['categorical'].get(n, palettes['categorical'][8][:n])
else:
return palettes[style]
# Usage
colors = get_accessible_palette(4)
def publication_barplot(data: dict, ylabel: str, title: str = '',
output: str = 'figure.pdf'):
"""
Create a publication-quality bar chart.
Args:
data: Dict mapping group names to (mean, std_error) tuples
"""
setup_publication_style('nature')
colors = get_accessible_palette(len(data))
fig, ax = plt.subplots()
x = np.arange(len(data))
names = list(data.keys())
means = [data[k][0] for k in names]
errors = [data[k][1] for k in names]
bars = ax.bar(x, means, yerr=errors, capsize=3, color=colors,
edgecolor='black', linewidth=0.5, width=0.6,
error_kw={'linewidth': 0.5})
ax.set_xticks(x)
ax.set_xticklabels(names, rotation=0)
ax.set_ylabel(ylabel)
if title:
ax.set_title(title)
# Remove top and right spines
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
fig.savefig(output, dpi=300, bbox_inches='tight')
plt.close()
return output
from scipy import stats
def publication_scatter(x, y, xlabel, ylabel, output='scatter.pdf',
groups=None, group_labels=None):
"""Publication-quality scatter plot with optional regression line."""
setup_publication_style('nature')
fig, ax = plt.subplots()
if groups is None:
ax.scatter(x, y, s=15, alpha=0.7, color='#0072B2', edgecolors='none')
# Regression line
slope, intercept, r, p, se = stats.linregress(x, y)
x_fit = np.linspace(min(x), max(x), 100)
ax.plot(x_fit, slope*x_fit + intercept, '--', color='#D55E00', linewidth=0.8)
ax.text(0.05, 0.95, f'r = {r:.2f}, p = {p:.3f}',
transform=ax.transAxes, fontsize=6, va='top')
else:
colors = get_accessible_palette(len(set(groups)))
for i, label in enumerate(group_labels or sorted(set(groups))):
mask = np.array(groups) == label
ax.scatter(np.array(x)[mask], np.array(y)[mask],
s=15, alpha=0.7, color=colors[i], label=label)
ax.legend(frameon=False)
ax.set_xlabel(xlabel)
ax.set_ylabel(ylabel)
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
fig.savefig(output, dpi=300, bbox_inches='tight')
plt.close()
def multi_panel_figure(n_rows, n_cols, panel_data, output='multipanel.pdf'):
"""Create a multi-panel figure with automatic panel labels."""
setup_publication_style('nature')
fig, axes = plt.subplots(n_rows, n_cols,
figsize=(3.3*n_cols, 2.5*n_rows))
if n_rows * n_cols == 1:
axes = np.array([axes])
axes = axes.flatten()
labels = 'abcdefghijklmnopqrstuvwxyz'
for i, ax in enumerate(axes[:len(panel_data)]):
# Add panel label
ax.text(-0.15, 1.05, labels[i], transform=ax.transAxes,
fontsize=10, fontweight='bold', va='bottom')
plt.tight_layout()
fig.savefig(output, dpi=300, bbox_inches='tight')
plt.close()
plt.rcParams['pdf.fonttype'] = 42)# Ensure fonts are embedded in PDF output
mpl.rcParams['pdf.fonttype'] = 42 # TrueType fonts
mpl.rcParams['ps.fonttype'] = 42