Chart Image Generatorのロゴ

Chart Image Generator

コミュニティ
wentorai
chart-image-generator

Generate publication-quality chart images from research data

概要

公開者wentorai
リポジトリresearch-plugins
スキル名chart-image-generator
スター
294
フォーク
42
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    wentoraiがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Chart Image Generator」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/wentorai/research-plugins/tree/main/skills/analysis/dataviz/chart-image-generator
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wentorai/research-plugins.git /tmp/research-plugins
mkdir -p .claude/skills
cp -r /tmp/research-plugins/skills/analysis/dataviz/chart-image-generator .claude/skills/chart-image-generator
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでChart Image Generatorを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にChart Image Generatorを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Chart Image Generatorは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Chart Image Generator

A skill for generating publication-quality chart images from research data using Python visualization libraries. Covers chart type selection, styling for academic journals, multi-panel layouts, color accessibility, and export at the correct resolution and format for submission.

Overview

Creating figures for academic publications requires more than just plotting data. Journals have specific requirements for resolution (typically 300-600 DPI), file format (TIFF, EPS, PDF, or high-resolution PNG), font sizes (often 8-12pt in the final printed figure), line weights, and color accessibility. This skill automates the production of figures that meet these standards, reducing the time researchers spend on manual formatting and ensuring consistency across all figures in a manuscript.

The skill supports common chart types used in academic research: scatter plots, bar charts, line plots, box plots, violin plots, heatmaps, forest plots, Kaplan-Meier curves, and multi-panel composite figures. All examples use matplotlib and seaborn with a custom academic styling configuration.

Academic Figure Styling

Journal-Ready Style Configuration

python
import matplotlib.pyplot as plt
import matplotlib as mpl

def set_academic_style():
    """
    Configure matplotlib for publication-quality figures.
    Matches common requirements for Nature, Science, PLOS, IEEE journals.
    """
    plt.rcParams.update({
        # Font settings
        'font.family': 'sans-serif',
        'font.sans-serif': ['Arial', 'Helvetica', 'DejaVu Sans'],
        'font.size': 8,
        'axes.titlesize': 9,
        'axes.labelsize': 8,
        'xtick.labelsize': 7,
        'ytick.labelsize': 7,
        'legend.fontsize': 7,

        # Line and marker settings
        'lines.linewidth': 1.0,
        'lines.markersize': 4,
        'axes.linewidth': 0.5,
        'xtick.major.width': 0.5,
        'ytick.major.width': 0.5,

        # Grid and background
        'axes.grid': False,
        'axes.facecolor': 'white',
        'figure.facecolor': 'white',

        # Legend
        'legend.frameon': False,
        'legend.borderpad': 0.3,

        # Save settings
        'savefig.dpi': 300,
        'savefig.bbox': 'tight',
        'savefig.pad_inches': 0.05,

        # Use Type 1 fonts for EPS/PDF (required by many journals)
        'pdf.fonttype': 42,
        'ps.fonttype': 42,
    })

# Common journal figure widths (in inches):
SINGLE_COLUMN = 3.5   # ~89mm (Nature, Science, PLOS)
DOUBLE_COLUMN = 7.0   # ~178mm
ONE_AND_HALF = 5.5    # ~140mm

Accessible Color Palettes

python
# Colorblind-safe palettes for academic figures
PALETTES = {
    'categorical_8': [
        '#332288', '#88CCEE', '#44AA99', '#117733',
        '#999933', '#DDCC77', '#CC6677', '#882255'
    ],  # Tol's qualitative palette

    'sequential': 'viridis',  # Perceptually uniform

    'diverging': 'RdBu_r',   # Red-Blue diverging

    'binary': ['#0072B2', '#D55E00'],  # Blue and vermilion
}

Chart Type Selection Guide

Data PatternRecommended ChartWhen to Use
Distribution of one variableHistogram, KDE, violinShowing data spread
Comparing groupsBox plot, violin, bar + error barsGroup differences
Two continuous variablesScatter plotCorrelation, regression
Trends over timeLine plotTime series, longitudinal
ProportionsStacked bar, pie (sparingly)Composition
Correlation matrixHeatmapMany variable pairs
Effect sizes + CIsForest plotMeta-analysis, multi-model
Survival dataKaplan-Meier curveTime-to-event

Generating Common Academic Charts

Scatter Plot with Regression Line

python
import numpy as np
import seaborn as sns

def scatter_with_regression(x, y, xlabel, ylabel, title, output_path,
                            groups=None, group_label=None):
    """
    Create a scatter plot with regression line and confidence interval.
    """
    set_academic_style()
    fig, ax = plt.subplots(figsize=(SINGLE_COLUMN, SINGLE_COLUMN * 0.8))

    if groups is not None:
        for group_val in sorted(set(groups)):
            mask = groups == group_val
            ax.scatter(x[mask], y[mask], s=15, alpha=0.7, label=group_val)
        ax.legend(title=group_label)
    else:
        ax.scatter(x, y, s=15, alpha=0.7, color=PALETTES['binary'][0])

    # Add regression line
    from scipy import stats
    slope, intercept, r, p, se = stats.linregress(x, y)
    x_line = np.linspace(x.min(), x.max(), 100)
    ax.plot(x_line, slope * x_line + intercept, color='#CC6677',
            linewidth=1.0, linestyle='--')

    # Annotate with statistics
    ax.text(0.05, 0.95, f'r = {r:.3f}\np = {p:.3f}',
            transform=ax.transAxes, verticalalignment='top', fontsize=7)

    ax.set_xlabel(xlabel)
    ax.set_ylabel(ylabel)
    ax.set_title(title)

    fig.savefig(output_path, dpi=300, bbox_inches='tight')
    plt.close(fig)
    return output_path

Multi-Panel Composite Figure

python
def create_multipanel_figure(panels: list, ncols: int = 2,
                              output_path: str = 'figure.pdf'):
    """
    Create a multi-panel figure with automatic panel labels (A, B, C, ...).

    Args:
        panels: List of dicts with 'plot_func', 'args', 'title'
        ncols: Number of columns
        output_path: Output file path
    """
    set_academic_style()
    nrows = int(np.ceil(len(panels) / ncols))
    fig, axes = plt.subplots(nrows, ncols,
                              figsize=(DOUBLE_COLUMN, 3.0 * nrows))
    axes = axes.flatten() if hasattr(axes, 'flatten') else [axes]

    for i, (ax, panel) in enumerate(zip(axes, panels)):
        panel['plot_func'](ax, **panel.get('args', {}))
        # Add panel label (A, B, C, ...)
        ax.text(-0.15, 1.08, chr(65 + i), transform=ax.transAxes,
                fontsize=11, fontweight='bold', va='top')
        if 'title' in panel:
            ax.set_title(panel['title'])

    # Hide unused panels
    for ax in axes[len(panels):]:
        ax.set_visible(False)

    fig.tight_layout()
    fig.savefig(output_path, dpi=300, bbox_inches='tight')
    plt.close(fig)
    return output_path

Export Specifications by Journal

Journal / PublisherFormatDPIMax WidthColor Mode
NatureTIFF, EPS, PDF300180mmRGB
ScienceEPS, PDF300174mmRGB
PLOSTIFF, EPS300174mmRGB
IEEEEPS, PDF, PNG3003.5in (1-col)RGB or CMYK
ElsevierTIFF, EPS, PDF300-600190mmRGB or CMYK
SpringerTIFF, EPS, PDF300174mmRGB or CMYK

Export Function

python
def export_figure(fig, basename: str, formats=('pdf', 'png', 'tiff'), dpi=300):
    """Export a figure in multiple formats for journal submission."""
    paths = []
    for fmt in formats:
        path = f"{basename}.{fmt}"
        fig.savefig(path, format=fmt, dpi=dpi, bbox_inches='tight',
                    facecolor='white', edgecolor='none')
        paths.append(path)
    return paths

Best Practices

  • Always use vector formats (PDF, EPS) for line art and plots; raster (TIFF, PNG) only when required.
  • Set figure dimensions to the exact column width of your target journal.
  • Use the same font and size across all figures in a manuscript for consistency.
  • Test figures in grayscale to ensure they remain readable without color.
  • Include all figure generation code in your supplementary materials for reproducibility.
  • Label axes with units (e.g., "Temperature (K)") and avoid abbreviations unless defined.

References

  • Rougier, N. P., Droettboom, M., & Borne, P. E. (2014). Ten Simple Rules for Better Figures. PLoS Computational Biology, 10(9).
  • Tufte, E. R. (2001). The Visual Display of Quantitative Information (2nd ed.). Graphics Press.
  • Wong, B. (2011). Color Blindness. Nature Methods, 8(6), 441.

よくある質問

AIスキル「Chart Image Generator」では何ができますか?

Generate publication-quality chart images from research data

TypingMindでChart Image Generatorを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Chart Image Generatorはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにChart Image Generatorをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/wentorai/research-plugins/tree/main/skills/analysis/dataviz/chart-image-generatorを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Chart Image Generatorを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Chart Image Generatorで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもChart Image Generatorを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Chart Image Generator」は無料ですか?

はい。wentoraiがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇