scientific-visualization について
Pythonの作図ライブラリを使い、論文掲載向けの科学図表を作成・確認するスキルです。研究者向けに、アクセシビリティ、多パネル構成、雑誌別の出力設定を扱います。
主な機能
- 01雑誌別のスタイルとサイズ
- 02多パネル図のレイアウト
- 03色覚対応パレットとグレースケール確認
- 04ベクター形式とラスター形式への出力
- 05統計注記のガイダンス
活用シーン
- 01投稿用図表の準備
- 02多パネル研究図の作成
- 03グラフの色のアクセシビリティ改善
- 04雑誌の仕様に沿った図表の出力
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ davila7/ claude-code-templates --skill scientific-visualizationインストール後、Claude Code で/scientific-visualizationを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
assets/color_palettes.pynature.mplstylepresentation.mplstylepublication.mplstylereferences/color_palettes.mdjournal_requirements.mdmatplotlib_examples.mdpublication_guidelines.mdscripts/figure_export.pystyle_presets.py詳細
Scientific Visualization
概要
科学可視化では、データを明瞭で正確な論文掲載用の図に変換します。複数パネルのレイアウト、エラーバー、有意差マーカー、色覚多様性に配慮したカラーパレットを使って、学術誌への投稿に適したプロットを作成します。matplotlib、seaborn、plotlyを使用して、原稿用にPDF/EPS/TIFF形式でエクスポートします。
このスキルを使う場面
次のような場合に、このスキルを使用します。
- 科学論文用のプロットや可視化を作成する
- 学術誌への投稿用の図を準備する(Nature、Science、Cell、PLOSなど)
- 図を色覚多様性に配慮し、誰もが利用しやすいものにする
- 一貫したスタイルで複数パネルの図を作成する
- 適切な解像度と形式で図をエクスポートする
- 特定の出版ガイドラインに従う
- 既存の図を出版基準に適合するよう改善する
- カラーとグレースケールのどちらでも使える図を作成する
クイックスタートガイド
出版品質の基本的な図
import matplotlib.pyplot as plt
import numpy as np
# Apply publication style (from scripts/style_presets.py)
from style_presets import apply_publication_style
apply_publication_style('default')
# Create figure with appropriate size (single column = 3.5 inches)
fig, ax = plt.subplots(figsize=(3.5, 2.5))
# Plot data
x = np.linspace(0, 10, 100)
ax.plot(x, np.sin(x), label='sin(x)')
ax.plot(x, np.cos(x), label='cos(x)')
# Proper labeling with units
ax.set_xlabel('Time (seconds)')
ax.set_ylabel('Amplitude (mV)')
ax.legend(frameon=False)
# Remove unnecessary spines
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
# Save in publication formats (from scripts/figure_export.py)
from figure_export import save_publication_figure
save_publication_figure(fig, 'figure1', formats=['pdf', 'png'], dpi=300)
設定済みのスタイルを使用する
assets/ 内のmatplotlibスタイルファイルを使って、学術誌ごとのスタイルを適用します。
import matplotlib.pyplot as plt
# Option 1: Use style file directly
plt.style.use('assets/nature.mplstyle')
# Option 2: Use style_presets.py helper
from style_presets import configure_for_journal
configure_for_journal('nature', figure_width='single')
# Now create figures - they'll automatically match Nature specifications
fig, ax = plt.subplots()
# ... your plotting code ...
seabornでクイックスタート
統計プロットには、出版向けのスタイルを適用したseabornを使用します。
import seaborn as sns
import matplotlib.pyplot as plt
from style_presets import apply_publication_style
# Apply publication style
apply_publication_style('default')
sns.set_theme(style='ticks', context='paper', font_scale=1.1)
sns.set_palette('colorblind')
# Create statistical comparison figure
fig, ax = plt.subplots(figsize=(3.5, 3))
sns.boxplot(data=df, x='treatment', y='response',
order=['Control', 'Low', 'High'], palette='Set2', ax=ax)
sns.stripplot(data=df, x='treatment', y='response',
order=['Control', 'Low', 'High'],
color='black', alpha=0.3, size=3, ax=ax)
ax.set_ylabel('Response (μM)')
sns.despine()
# Save figure
from figure_export import save_publication_figure
save_publication_figure(fig, 'treatment_comparison', formats=['pdf', 'png'], dpi=300)
基本原則とベストプラクティス
1. 解像度とファイル形式
重要な要件(詳しくは references/publication_guidelines.md を参照してください):
- ラスター画像(写真、顕微鏡画像):300~600 DPI
- 線画(グラフ、プロット):600~1200 DPI、またはベクター形式
- ベクター形式(推奨):PDF、EPS、SVG
- ラスター形式:TIFF、PNG(科学データにはJPEGを使用しないでください)
実装:
# Use the figure_export.py script for correct settings
from figure_export import save_publication_figure
# Saves in multiple formats with proper DPI
save_publication_figure(fig, 'myfigure', formats=['pdf', 'png'], dpi=300)
# Or save for specific journal requirements
from figure_export import save_for_journal
save_for_journal(fig, 'figure1', journal='nature', figure_type='combination')
2. 色の選択 — 色覚多様性への配慮
常に色覚多様性に配慮したカラーパレットを使用します(詳しくは references/color_palettes.md を参照してください)。
推奨:岡部伊東パレット(あらゆる種類の色覚特性の人が色を区別できます):
# Option 1: Use assets/color_palettes.py
from color_palettes import OKABE_ITO_LIST, apply_palette
apply_palette('okabe_ito')
# Option 2: Manual specification
okabe_ito = ['#E69F00', '#56B4E9', '#009E73', '#F0E442',
'#0072B2', '#D55E00', '#CC79A7', '#000000']
plt.rcParams['axes.prop_cycle'] = plt.cycler(color=okabe_ito)
ヒートマップ/連続データの場合:
- 知覚的に均一なカラーマップを使用します:
viridis、plasma、cividis - 赤と緑の発散型カラーマップは避けます(代わりに
PuOr、RdBu、BrBGを使用します) jetやrainbowのカラーマップは使用しないでください
解釈しやすさを確保するため、図は必ずグレースケールでも確認してください。
3. タイポグラフィとテキスト
フォントのガイドライン(詳しくは references/publication_guidelines.md を参照してください):
- サンセリフフォント:Arial、Helvetica、Calibri
- 最終印刷サイズでの最小文字サイズ:
- 軸ラベル:7~9 pt
- 目盛りラベル:6~8 pt
- パネルラベル:8~12 pt(太字)
- ラベルは文頭のみ大文字にします:「Time (hours)」ではなく「TIME (HOURS)」
- 単位は必ず括弧内に記載します
実装:
# Set fonts globally
import matplotlib as mpl
mpl.rcParams['font.family'] = 'sans-serif'
mpl.rcParams['font.sans-serif'] = ['Arial', 'Helvetica']
mpl.rcParams['font.size'] = 8
mpl.rcParams['axes.labelsize'] = 9
mpl.rcParams['xtick.labelsize'] = 7
mpl.rcParams['ytick.labelsize'] = 7
4. 図の寸法
学術誌ごとの幅(詳しくは references/journal_requirements.md を参照してください):
- Nature:1段組 89 mm、2段組 183 mm
- Science:1段組 55 mm、2段組 175 mm
- Cell:1段組 85 mm、2段組 178 mm
図のサイズが要件に適合しているか確認します:
from figure_export import check_figure_size
fig = plt.figure(figsize=(3.5, 3)) # 89 mm for Nature
check_figure_size(fig, journal='nature')
5. 複数パネルの図
ベストプラクティス:
- パネルには太字の文字を付けます:A、B、C(ほとんどの学術誌では大文字、Natureでは小文字)
- すべてのパネルでスタイルを統一します
- 可能な場合はパネルの端を揃えます
- パネル間に十分な余白を設けます
実装例(完全なコードは references/matplotlib_examples.md を参照してください):
from string import ascii_uppercase
fig = plt.figure(figsize=(7, 4))
gs = fig.add_gridspec(2, 2, hspace=0.4, wspace=0.4)
ax1 = fig.add_subplot(gs[0, 0])
ax2 = fig.add_subplot(gs[0, 1])
# ... create other panels ...
# Add panel labels
for i, ax in enumerate([ax1, ax2, ...]):
ax.text(-0.15, 1.05, ascii_uppercase[i], transform=ax.transAxes,
fontsize=10, fontweight='bold', va='top')
よくあるタスク
タスク1:投稿用の折れ線グラフを作成する
完全なコードは references/matplotlib_examples.md の例1を参照してください。
主な手順:
- 出版向けのスタイルを適用する
- 投稿先の学術誌に適した図のサイズを設定する
- 色覚多様性に配慮した色を使用する
- 適切な形式(SEM、SD、またはCI)でエラーバーを追加する
- 単位を付けて軸にラベルを付ける
- 不要な軸線を取り除く
- ベクター形式で保存する
信頼区間を自動で表示するseabornの使用方法:
import seaborn as sns
fig, ax = plt.subplots(figsize=(5, 3))
sns.lineplot(data=timeseries, x='time', y='measurement',
hue='treatment', errorbar=('ci', 95),
markers=True, ax=ax)
ax.set_xlabel('Time (hours)')
ax.set_ylabel('Measurement (AU)')
sns.despine()
タスク2:複数パネルの図を作成する
完全なコードは references/matplotlib_examples.md の例2を参照してください。
主な手順:
- 柔軟なレイアウトには
GridSpecを使用する - パネル間でスタイルを統一する
- 太字のパネルラベル(A、B、Cなど)を付ける
- 関連するパネルを揃える
- 最終サイズでテキストがすべて読みやすいことを確認する
Task 3: 適切なカラーマップでヒートマップを作成する
完全なコードは references/matplotlib_examples.md の例 4 を参照してください。
主な手順:
- 知覚的に一様なカラーマップ(
viridis、plasma、cividis)を使用する - ラベル付きのカラーバーを含める
- 発散型データには、色覚異常に配慮した発散型マップ(
RdBu_r、PuOr)を使用する - 発散型マップには適切な中心値を設定する
- グレースケールでの見え方を確認する
相関行列に seaborn を使用する場合:
import seaborn as sns
fig, ax = plt.subplots(figsize=(5, 4))
corr = df.corr()
mask = np.triu(np.ones_like(corr, dtype=bool))
sns.heatmap(corr, mask=mask, annot=True, fmt='.2f',
cmap='RdBu_r', center=0, square=True,
linewidths=1, cbar_kws={'shrink': 0.8}, ax=ax)
Task 4: 特定のジャーナル向けに図を準備する
ワークフロー:
- ジャーナルの要件を確認する:
references/journal_requirements.md - ジャーナル向けに matplotlib を設定する:
from style_presets import configure_for_journal configure_for_journal('nature', figure_width='single') - 図を作成する(自動的に正しいサイズになります)
- ジャーナルの仕様に合わせて書き出す:
from figure_export import save_for_journal save_for_journal(fig, 'figure1', journal='nature', figure_type='line_art')
Task 5: 既存の図を出版基準に適合させる
チェックリスト方式(完全なチェックリストは references/publication_guidelines.md にあります):
- 解像度を確認する: DPI がジャーナルの要件を満たしているか検証する
- ファイル形式を確認する: プロットにはベクター形式、画像には TIFF/PNG を使用する
- 色を確認する: 色覚異常に配慮されていることを確認する
- フォントを確認する: 最終サイズで最小 6〜7 pt、サンセリフ体にする
- ラベルを確認する: すべての軸に単位付きのラベルがあるか確認する
- サイズを確認する: ジャーナルの段組み幅に一致しているか確認する
- グレースケールを確認する: 色がなくても図が理解できるか確認する
- チャートジャンクを取り除く: 不要なグリッド、3D 効果、影を取り除く
Task 6: 色覚異常に配慮した可視化を作成する
方針:
assets/color_palettes.pyにある承認済みパレットを使用する- 冗長な符号化(線種、マーカー、パターン)を追加する
- 色覚シミュレーターでテストする
- グレースケールへの対応を確認する
例:
from color_palettes import apply_palette
import matplotlib.pyplot as plt
apply_palette('okabe_ito')
# Add redundant encoding beyond color
line_styles = ['-', '--', '-.', ':']
markers = ['o', 's', '^', 'v']
for i, (data, label) in enumerate(datasets):
plt.plot(x, data, linestyle=line_styles[i % 4],
marker=markers[i % 4], label=label)
統計的厳密性
必ず含めるもの:
- 誤差線(SD、SEM、または CI。どれを使ったかはキャプションに明記する)
- 図またはキャプション内のサンプルサイズ(n)
- 統計的有意性の記号(、、)
- 可能な場合は要約統計量だけでなく個々のデータ点
統計を含む例:
# Show individual points with summary statistics
ax.scatter(x_jittered, individual_points, alpha=0.4, s=8)
ax.errorbar(x, means, yerr=sems, fmt='o', capsize=3)
# Mark significance
ax.text(1.5, max_y * 1.1, '***', ha='center', fontsize=8)
異なるプロットライブラリでの作業
Matplotlib
- 出版向けの細部を最も細かく制御できる
- 複雑な複数パネルの図に最適
- 一貫した書式のために、提供されているスタイルファイルを使用する
- 豊富な例は
references/matplotlib_examples.mdを参照
Seaborn
Seaborn は、matplotlib の上に構築された、統計グラフィックス向けの高レベルなデータセット指向のインターフェースです。matplotlib によるカスタマイズと完全な互換性を保ちながら、少ないコードで出版品質の統計的可視化を作成することに優れています。
科学的可視化における主な利点:
- 統計量の自動推定と信頼区間
- 複数パネルの図(ファセット)に標準で対応
- デフォルトで色覚異常に配慮したパレット
- pandas DataFrame を使用するデータセット指向の API
- 変数から視覚的属性へのセマンティックマッピング
出版スタイルのクイックスタート
まず matplotlib の出版スタイルを適用し、その後で seaborn を設定してください:
import seaborn as sns
import matplotlib.pyplot as plt
from style_presets import apply_publication_style
# Apply publication style
apply_publication_style('default')
# Configure seaborn for publication
sns.set_theme(style='ticks', context='paper', font_scale=1.1)
sns.set_palette('colorblind') # Use colorblind-safe palette
# Create figure
fig, ax = plt.subplots(figsize=(3.5, 2.5))
sns.scatterplot(data=df, x='time', y='response',
hue='treatment', style='condition', ax=ax)
sns.despine() # Remove top and right spines
出版向けによく使うプロットの種類
統計比較:
# Box plot with individual points for transparency
fig, ax = plt.subplots(figsize=(3.5, 3))
sns.boxplot(data=df, x='treatment', y='response',
order=['Control', 'Low', 'High'], palette='Set2', ax=ax)
sns.stripplot(data=df, x='treatment', y='response',
order=['Control', 'Low', 'High'],
color='black', alpha=0.3, size=3, ax=ax)
ax.set_ylabel('Response (μM)')
sns.despine()
分布の分析:
# Violin plot with split comparison
fig, ax = plt.subplots(figsize=(4, 3))
sns.violinplot(data=df, x='timepoint', y='expression',
hue='treatment', split=True, inner='quartile', ax=ax)
ax.set_ylabel('Gene Expression (AU)')
sns.despine()
相関行列:
# Heatmap with proper colormap and annotations
fig, ax = plt.subplots(figsize=(5, 4))
corr = df.corr()
mask = np.triu(np.ones_like(corr, dtype=bool)) # Show only lower triangle
sns.heatmap(corr, mask=mask, annot=True, fmt='.2f',
cmap='RdBu_r', center=0, square=True,
linewidths=1, cbar_kws={'shrink': 0.8}, ax=ax)
plt.tight_layout()
信頼帯付きの時系列:
# Line plot with automatic CI calculation
fig, ax = plt.subplots(figsize=(5, 3))
sns.lineplot(data=timeseries, x='time', y='measurement',
hue='treatment', style='replicate',
errorbar=('ci', 95), markers=True, dashes=False, ax=ax)
ax.set_xlabel('Time (hours)')
ax.set_ylabel('Measurement (AU)')
sns.despine()
seaborn による複数パネルの図
FacetGrid による自動ファセット:
# Create faceted plot
g = sns.relplot(data=df, x='dose', y='response',
hue='treatment', col='cell_line', row='timepoint',
kind='line', height=2.5, aspect=1.2,
errorbar=('ci', 95), markers=True)
g.set_axis_labels('Dose (μM)', 'Response (AU)')
g.set_titles('{row_name} | {col_name}')
sns.despine()
# Save with correct DPI
from figure_export import save_publication_figure
save_publication_figure(g.figure, 'figure_facets',
formats=['pdf', 'png'], dpi=300)
seaborn と matplotlib のサブプロットの組み合わせ:
# Create custom multi-panel layout
fig, axes = plt.subplots(2, 2, figsize=(7, 6))
# Panel A: Scatter with regression
sns.regplot(data=df, x='predictor', y='response', ax=axes[0, 0])
axes[0, 0].text(-0.15, 1.05, 'A', transform=axes[0, 0].transAxes,
fontsize=10, fontweight='bold')
# Panel B: Distribution comparison
sns.violinplot(data=df, x='group', y='value', ax=axes[0, 1])
axes[0, 1].text(-0.15, 1.05, 'B', transform=axes[0, 1].transAxes,
fontsize=10, fontweight='bold')
# Panel C: Heatmap
sns.heatmap(correlation_data, cmap='viridis', ax=axes[1, 0])
axes[1, 0].text(-0.15, 1.05, 'C', transform=axes[1, 0].transAxes,
fontsize=10, fontweight='bold')
# Panel D: Time series
sns.lineplot(data=timeseries, x='time', y='signal',
hue='condition', ax=axes[1, 1])
axes[1, 1].text(-0.15, 1.05, 'D', transform=axes[1, 1].transAxes,
fontsize=10, fontweight='bold')
plt.tight_layout()
sns.despine()
出版向けのカラーパレット
Seaborn には、色覚異常に配慮したパレットがいくつか含まれています:
# Use built-in colorblind palette (recommended)
sns.set_palette('colorblind')
# Or specify custom colorblind-safe colors (Okabe-Ito)
okabe_ito = ['#E69F00', '#56B4E9', '#009E73', '#F0E442',
'#0072B2', '#D55E00', '#CC79A7', '#000000']
sns.set_palette(okabe_ito)
# For heatmaps and continuous data
sns.heatmap(data, cmap='viridis') # Perceptually uniform
sns.heatmap(corr, cmap='RdBu_r', center=0) # Diverging, centered
軸レベル関数と図レベル関数の選択
軸レベル関数(例: scatterplot、boxplot、heatmap):
- 独自の複数パネルレイアウトを構築する場合に使用する
- 正確な配置のために
ax=パラメーターを受け付ける - matplotlib のサブプロットとの統合性が高い
- 図の構成をより細かく制御できる
fig, ax = plt.subplots(figsize=(3.5, 2.5))
sns.scatterplot(data=df, x='x', y='y', hue='group', ax=ax)
図レベル関数(例: relplot、catplot、displot):
- カテゴリ変数による自動ファセットに使用する
- 一貫したスタイルで完全な図を作成する
- 探索的分析に最適
- サイズ指定には
heightとaspectを使用する
g = sns.relplot(data=df, x='x', y='y', col='category', kind='scatter')
Seaborn による統計的厳密性
Seaborn は不確実性を自動的に計算して表示します:
# Line plot: shows mean ± 95% CI by default
sns.lineplot(data=df, x='time', y='value', hue='treatment',
errorbar=('ci', 95)) # Can change to 'sd', 'se', etc.
# Bar plot: shows mean with bootstrapped CI
sns.barplot(data=df, x='treatment', y='response',
errorbar=('ci', 95), capsize=0.1)
# Always specify error type in figure caption:
# "Error bars represent 95% confidence intervals"
出版向け Seaborn 図の ベストプラクティス
-
まず出版用テーマを設定する:
sns.set_theme(style='ticks', context='paper', font_scale=1.1) -
色覚に配慮したパレットを使用する:
sns.set_palette('colorblind') -
不要な要素を削除する:
sns.despine() # Remove top and right spines -
図のサイズを適切に設定する:
# Axes-level: use matplotlib figsize fig, ax = plt.subplots(figsize=(3.5, 2.5)) # Figure-level: use height and aspect g = sns.relplot(..., height=3, aspect=1.2) -
可能な場合は個々のデータポイントを表示する:
sns.boxplot(...) # Summary statistics sns.stripplot(..., alpha=0.3) # Individual points -
単位を含む適切なラベルを付ける:
ax.set_xlabel('Time (hours)') ax.set_ylabel('Expression (AU)') -
正しい解像度で書き出す:
from figure_export import save_publication_figure save_publication_figure(fig, 'figure_name', formats=['pdf', 'png'], dpi=300)
Seaborn の高度なテクニック
探索的分析のためのペア間関係:
# Quick overview of all relationships
g = sns.pairplot(data=df, hue='condition',
vars=['gene1', 'gene2', 'gene3'],
corner=True, diag_kind='kde', height=2)
階層的クラスタリングのヒートマップ:
# Cluster samples and features
g = sns.clustermap(expression_data, method='ward',
metric='euclidean', z_score=0,
cmap='RdBu_r', center=0,
figsize=(10, 8),
row_colors=condition_colors,
cbar_kws={'label': 'Z-score'})
周辺分布付きの同時分布:
# Bivariate distribution with context
g = sns.jointplot(data=df, x='gene1', y='gene2',
hue='treatment', kind='scatter',
height=6, ratio=4, marginal_kws={'kde': True})
Seaborn でよくある問題と解決策
問題: 凡例がプロット領域の外にはみ出す
g = sns.relplot(...)
g._legend.set_bbox_to_anchor((0.9, 0.5))
問題: ラベルが重なる
plt.xticks(rotation=45, ha='right')
plt.tight_layout()
問題: 最終サイズで文字が小さすぎる
sns.set_context('paper', font_scale=1.2) # Increase if needed
追加リソース
Seaborn の詳細情報については、以下を参照してください:
scientific-packages/seaborn/SKILL.md- Seaborn の包括的なドキュメントscientific-packages/seaborn/references/examples.md- 実践的なユースケースscientific-packages/seaborn/references/function_reference.md- 完全な API リファレンスscientific-packages/seaborn/references/objects_interface.md- 最新の宣言型 API
Plotly
- 探索用のインタラクティブな図
- 出版用の静的画像の書き出し
- 出版品質向けの設定:
fig.update_layout(
font=dict(family='Arial, sans-serif', size=10),
plot_bgcolor='white',
# ... see matplotlib_examples.md Example 8
)
fig.write_image('figure.png', scale=3) # scale=3 gives ~300 DPI
リソース
リファレンスディレクトリ
詳細情報が必要に応じて読み込んでください:
-
publication_guidelines.md: 包括的なベストプラクティス- 解像度とファイル形式の要件
- タイポグラフィのガイドライン
- レイアウトと構成のルール
- 統計的厳密性の要件
- 完全な出版チェックリスト
-
color_palettes.md: 配色の利用ガイド- RGB 値付きの色覚に配慮したパレットの仕様
- 連続型および発散型カラーマップの推奨事項
- アクセシビリティのテスト手順
- 分野別パレット(ゲノミクス、顕微鏡)
-
journal_requirements.md: ジャーナル別の仕様- 出版社別の技術要件
- ファイル形式と DPI の仕様
- 図の寸法要件
- クイックリファレンス表
-
matplotlib_examples.md: 実践的なコード例- 完全に動作する例 10 件
- 折れ線グラフ、棒グラフ、ヒートマップ、複数パネルの図
- ジャーナル別の図の例
- 各ライブラリ(matplotlib、seaborn、plotly)のヒント
スクリプトディレクトリ
自動化にはこれらの補助スクリプトを使用してください:
-
figure_export.py: 書き出しユーティリティsave_publication_figure(): 正しい DPI で複数の形式に保存save_for_journal(): ジャーナル固有の要件を自動的に適用check_figure_size(): 寸法がジャーナルの仕様を満たしているか検証- 直接実行: 例を見るには
python scripts/figure_export.py
-
style_presets.py: 事前設定済みのスタイルapply_publication_style(): プリセットスタイル(default、nature、science、cell)を適用set_color_palette(): パレットを素早く切り替えconfigure_for_journal(): ワンコマンドでジャーナル向けを設定- 直接実行: 例を見るには
python scripts/style_presets.py
アセットディレクトリ
図で以下のファイルを使用してください:
-
color_palettes.py: インポート可能な配色定義- 推奨されるすべてのパレットを Python 定数として収録
apply_palette()ヘルパー関数- ノートブックやスクリプトに直接インポート可能
-
Matplotlib スタイルファイル:
plt.style.use()と併用publication.mplstyle: 一般的な出版品質nature.mplstyle: Nature ジャーナルの仕様presentation.mplstyle: ポスターやスライド向けの大きめのフォント
ワークフローの概要
出版用図表を作成するための推奨ワークフロー:
- 計画: 対象のジャーナル、図の種類、内容を決定する
- 設定: ジャーナルに適したスタイルを適用する
from style_presets import configure_for_journal configure_for_journal('nature', 'single') - 作成: 適切なラベル、色、統計情報を含めて図を作成する
- 検証: サイズ、フォント、色、アクセシビリティを確認する
from figure_export import check_figure_size check_figure_size(fig, journal='nature') - 書き出し: 必要な形式で保存する
from figure_export import save_for_journal save_for_journal(fig, 'figure1', 'nature', 'combination') - レビュー: 原稿の文脈で最終サイズの表示を確認する
避けるべきよくある落とし穴
- フォントが小さすぎる: 最終サイズで印刷すると文字が読めない
- JPEG形式: グラフやプロットには決してJPEGを使用しない(アーティファクトが発生する)
- 赤と緑の色: 男性の約8%は区別できない
- 低解像度: 出版物で図がピクセル化する
- 単位の欠落: 軸には必ず単位を付けてラベル付けする
- 3D効果: 知覚を歪めるため、完全に避ける
- チャートジャンク: 不要なグリッド線や装飾を取り除く
- 切り詰められた軸: 科学的に正当な理由がない限り、棒グラフは0から始める
- スタイルの不統一: 同じ原稿内の図で、フォントや色が異なる
- 誤差線の欠如: 不確かさは必ず示す
最終チェックリスト
図を提出する前に、以下を確認してください:
- 解像度がジャーナルの要件を満たしている(300 DPI以上)
- ファイル形式が正しい(プロットはベクター、画像はTIFF)
- 図のサイズがジャーナルの仕様に一致している
- すべての文字が最終サイズで読める(6 pt以上)
- 色が色覚多様性に配慮している
- 図がグレースケールでも機能する
- すべての軸に単位付きのラベルがある
- 誤差線があり、キャプションでその定義を示している
- パネルラベルがあり、一貫している
- チャートジャンクや3D効果がない
- すべての図でフォントが統一されている
- 統計的有意性が明確に示されている
- 凡例が明確で完全である
このスキルを使用して、科学的な図が最高水準の出版基準を満たしつつ、すべての読者にとって分かりやすいものになるよう確認してください。