scientific-publication について
研究者向けに、フィードバックを取り入れながら科学図表を反復改善するためのスキルです。視認性やレイアウト、出版要件の確認に加え、参考資料も備えています。
主な機能
- 01図表を反復改善する手順
- 02グラフ形式と明瞭さの指針
- 03複数パネルのレイアウト比較
- 04注釈と範囲外表示の修正
- 05出版前チェックリスト
- 06出版関連の参考資料
活用シーン
- 01査読コメントに基づく図表修正
- 02情報量の多いグラフの整理
- 03横並びと縦並びの比較
- 04投稿前の図表チェック
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ delphine-l/ claude_global --skill scientific-publicationインストール後、Claude Code で/scientific-publicationを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
methodological-transparency.mdmulti-study-results.mdoverleaf-packages.mdpublication-standards.md詳細
科学論文用図のブラッシュアップ
ユーザーフィードバックと投稿要件に基づき、反復的な改善を通じて科学論文用の図を体系的に改善するための専門的なガイダンスです。
このディレクトリ内の参考ファイル:
- publication-standards.md - DPI、ファイル形式、サイズ仕様、色のアクセシビリティ
- multi-study-results.md - 複数研究の分析結果を統合して記述する方法と、複雑なトレードオフから実践的な推奨事項を導く方法
- methodological-transparency.md - 図と統計に対する二重アプローチのパターン、外れ値の扱い
- overleaf-packages.md - テンプレートとチェックリストを使用した、投稿にすぐ使える Overleaf パッケージの作成
このスキルを使う場面
- 査読者や共同研究者のフィードバックに基づいて図を改善するとき
- 図の明瞭さと読みやすさを最適化するとき
- 図のすべての要素が枠内に収まっていることを確認するとき
- レイアウトの選択肢(横向きパネルと縦向きパネル)を検討するとき
- 影響力の大きい論文への投稿に向けて図を準備するとき
図の反復的なブラッシュアップのワークフロー
標準的なブラッシュアップ手順
論文用の図を改善する際は、次の体系的な手順に従ってください。
1. 中心的な問題を特定する
Examples:
- "Violin plots look distorted on log scale"
- "P-values are cut off at the top"
- "Too much visual clutter, hard to see the data"
- "Text overlaps with data points"
2. 可視化の種類や手法を修正する
# Example: Replace inappropriate plot type
# Before: Violin plot on log scale (distorted)
ax.violinplot(data)
ax.set_yscale('log')
# After: Boxplot on log scale (accurate)
ax.boxplot(data)
ax.set_yscale('log')
3. 視覚的な明瞭さを高める 要素のサイズを体系的に調整します。
# Point sizes: Reduce for dense data
# Start: s=60 (exploratory)
# End: s=25 (publication)
ax.scatter(..., s=25, alpha=0.5)
# Line widths: Thinner reduces clutter
# Start: linewidth=2.5
# End: linewidth=1.5
ax.plot(..., linewidth=1.5)
# Text sizes: Prevent overlap
# Start: fontsize=10-12
# End: fontsize=8-9
ax.text(..., fontsize=8)
# Error bar caps: Keep readable
ax.errorbar(..., capsize=5)
4. レイアウトの選択肢をテストする
# Option A: Side-by-side panels
fig, axes = plt.subplots(1, 2, figsize=(16, 7))
# Pros: Direct left-right comparison
# Cons: Smaller individual panels
# Option B: Stacked vertically
fig, axes = plt.subplots(2, 1, figsize=(10, 14))
# Pros: Larger individual panels, easier to read details
# Cons: Harder to compare across panels
# Decision: Let user feedback guide choice
# Generate both, ask which is clearer
5. 要素の配置を最適化する すべての注釈がプロットの枠内に収まるようにします。
# Calculate safe positioning
y_max = max([d.max() for d in data_list])
y_min = min([d.min() for d in data_list])
# Position annotations WITHIN bounds
y_pos = y_max * 0.92 # 92%, not 105% (which goes outside)
# Set explicit limits with headroom
ax.set_ylim(y_min * 0.95 if y_min > 0 else y_min - 5,
y_max * 1.05)
論文用の図のチェックリスト
図を最終決定する前に、このチェックリストを使用してください。
- データ分布に適したプロット形式(対数スケールでバイオリンプロットを使用しない)
- すべてのテキストが読みやすい(投稿用サイズで最低 8~10 pt)
- 統計注釈が見やすく、プロットの枠内に収まっている
- 凡例が明瞭で、データを覆っていない
- 軸ラベルが単位を含み、内容を明確に示している
- 配色が色覚多様性に配慮している
- 線の太さのバランスが取れている(太すぎず、細すぎない)
- 点のサイズが最適化されている(見やすく、重なっていない)
- DPI が投稿に十分である(最低 300)
- レイアウトをテスト済みである(該当する場合は横向きと縦向きの両方を試す)
- ファイル形式が投稿に適している(PNG、PDF、または SVG)
よくあるブラッシュアップのパターン
パターン 1:密集したプロットの整理
問題:視覚要素が多すぎて、互いに注意を奪い合っている
解決手順:
- 点のサイズを小さくする(60 -> 25)
- 線幅を細くする(2.5 -> 1.5)
- 透明度を上げる(alpha=0.8 -> 0.5)
- フォントサイズを小さくする(10 -> 8)
- グリッドを削除するか、薄くする(alpha=0.3)
変更前/変更後のテスト:両方のバージョンを生成して比較する
パターン 2:はみ出しの問題を修正する
問題:注釈、凡例、ラベルが切れている
解決策:
# 1. Adjust annotation positions
y_pos = y_max * 0.92 # Within bounds
# 2. Use bbox_inches='tight' when saving
plt.savefig('figure.png', dpi=300, bbox_inches='tight')
# 3. Explicitly set limits
ax.set_ylim(min_val * 0.95, max_val * 1.05)
# 4. Move legend outside plot area
ax.legend(bbox_to_anchor=(1.05, 1), loc='upper left')
# 5. Reduce text size
ax.text(..., fontsize=8) # Down from 10
パターン 3:複数パネルのレイアウト最適化
両方の向きを試す:
# Version 1: Horizontal (side-by-side)
fig, axes = plt.subplots(1, 2, figsize=(16, 7))
plt.savefig('fig_horizontal.png', dpi=300, bbox_inches='tight')
# Version 2: Vertical (stacked)
fig, axes = plt.subplots(2, 1, figsize=(10, 14))
plt.savefig('fig_vertical.png', dpi=300, bbox_inches='tight')
# Present both to user, ask which is clearer
判断基準:
- 横向き:パネル間の直接比較に適しています
- 縦向き:各パネルにより広いスペースが必要な場合に適しています
- ユーザーの利用状況:ジャーナルの段幅、プレゼンテーション用スライドなど
パターン 4:統計注釈を反復的に調整する
よくある問題:P 値がプロットの外に配置されている、またはデータと重なっている
解決策:
# Calculate data range first
all_data = [data_dual, data_prialt] # All datasets in plot
y_max = max([d.max() for d in all_data if len(d) > 0])
# Position relative to actual data, not theoretical maximum
for i, (x_pos, comparison) in enumerate(comparisons):
stat, pval = stats.mannwhitneyu(...)
# Safe positioning
y_annotation = y_max * 0.92 # Below the top
# Format text
if pval < 0.001:
text = 'p < 0.001***'
elif pval < 0.01:
text = 'p < 0.01**'
elif pval < 0.05:
text = 'p < 0.05*'
else:
text = f'p = {pval:.3f} ns'
ax.text(x_pos, y_annotation, text, ha='center', fontsize=9)
# Set explicit limits to ensure annotations fit
ax.set_ylim(0, y_max * 1.05)
改善ワークフローの例
実例:VGP Figure 5 の改善手順
-
初期バージョン:4 カテゴリ、対数スケールのバイオリンプロット
- 問題点:バイオリンプロットが歪み、複雑すぎます
-
V1 の改善:バイオリンプロットを削除し、箱ひげ図を残します
- 改善されましたが、まだ問題があります
-
V2 の改善:3 カテゴリに簡略化します
- 解釈がより明確になります
-
V3 の改善:点のサイズを縮小(60->25)し、線を細くします(2.5->1.5)
- ごちゃつきが軽減されます
-
V4 の改善:縦向きと横向きのレイアウトを比較します
- このケースでは横向きのほうが明確です
-
V5 の改善:p 値の位置を修正します(y_max の 105%->92%)
- すべての要素が見えるようになりました
-
最終版:統計情報ボックス内のテキストを小さくします(10->8)
- 論文掲載に適した状態です
合計反復回数:改善プロセスで 7 バージョン 結果:明確で正確な、論文掲載品質の図
ベストプラクティス
1. 改善のバージョンを管理する
大きな変更を加える際は、作業バージョンを保持します:
scripts/
plot_figure.py # Original
plot_figure_v2.py # After major change (layout)
plot_figure_final.py # Publication version
2. 複数の案を並行して作成する
レイアウトの選択肢を試す場合:
# Save both versions
layouts = [
((1, 2), (16, 7), 'horizontal'),
((2, 1), (10, 14), 'vertical')
]
for (nrows, ncols), figsize, name in layouts:
fig, axes = plt.subplots(nrows, ncols, figsize=figsize)
# ... plot data ...
plt.savefig(f'figure_{name}.png', dpi=300, bbox_inches='tight')
3. 改善内容を記録する
"""
Figure 5 - Terminal Telomere Presence
Version history:
- v1: Initial 4-category version with violin plots
- v2: Removed violin plots (distortion on log scale)
- v3: Simplified to 3 categories (terminal only)
- v4: Reduced point/line sizes for clarity
- v5: Fixed p-value positioning
- final: Publication ready
Changes from v4 -> v5:
- P-value y-position: 1.05 * y_max -> 0.92 * y_max
- Added explicit y-axis limits: (y_min*0.95, y_max*1.05)
- Ensures all annotations visible within plot bounds
"""
4. 重要な節目でフィードバックを得る
フィードバックなしに反復を重ねすぎないようにします:
- 大きな問題(誤ったプロット形式など)を修正した後:ユーザーに確認してもらう
- レイアウトを変更した後(横向きか縦向きかなど):ユーザーに確認してもらう
- 最終調整の後:ユーザーに確認してもらう
5. 図全体で一貫性を保つ
1 つの図を改善する場合、同じ改善がほかの図にも適用できるか確認します:
# Applied violin->boxplot fix to Figures 2, 7, 10, 11
# Applied size reductions consistently across all figures
# Used same color scheme throughout
まとめ
体系的な改善ワークフロー:
- 問題を特定 -> 2. 可視化を修正 -> 3. 明瞭さを向上 -> 4. レイアウトを比較 -> 5. 配置を最適化
主な原則:
- ユーザーのフィードバックに基づいて反復する
- 代替案を試す(選択肢を見せる)
- 変更を記録する
- 図全体に学びを適用する
- 論文掲載基準を満たす
よくある調整:
- 点のサイズ:60 -> 25
- 線の幅:2.5 -> 1.5
- フォントサイズ:10 -> 8
- 注釈の位置:最大値の 105% -> 92%
- 軸の範囲は常に明示的に設定する
詳しいガイダンスについては、以下の関連ファイルを参照してください:
- 論文掲載基準(DPI、形式、サイズ):publication-standards.md
- 複数研究の結果の記述:multi-study-results.md
- 方法論の透明性:methodological-transparency.md
- Overleaf パッケージの作成:overleaf-packages.md