ワンクリックで
scientific-advanced-visualization
科学データ高度可視化スキル。Plotly インタラクティブ 3D ・ Altair 宣言的可視化・Seaborn 統計プロット・ アニメーション・Parallel Coordinates・出版品質図。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
科学データ高度可視化スキル。Plotly インタラクティブ 3D ・ Altair 宣言的可視化・Seaborn 統計プロット・ アニメーション・Parallel Coordinates・出版品質図。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
実験の監査レポート・データ来歴(プロベナンス)生成スキル。 データ変換履歴・使用ツールのバージョン・データ整合性チェックを 含むトレーサビリティレポートを自動生成する。 「監査レポート作成」「データ来歴を記録」「トレーサビリティ」で発火。
派生実験設計スキル。既存の実験をベースに条件を変更した派生実験を 設計する。実験計画法(DOE)に基づくパラメータ探索を支援。 「派生実験を設計して」「条件を変えて実験」「パラメータ探索」で発火。
実験テンプレート生成スキル。研究目的・仮説・手法・実験条件・評価基準・ スケジュールを構造化した実験計画書を自動作成する。 「実験テンプレート作成して」「実験計画を立てて」「実験プロトコルを作成」で発火。
実験結果を論文形式(LaTeX / IMRaD)にエクスポートするスキル。 Introduction・Materials & Methods・Results・Discussion の構造で 出版準備用の原稿を自動生成する。 「論文にして」「LaTeX出力」「出版準備」で発火。
実験結果の査読・レビュースキル。再現性・統計的妥当性・方法論の 健全性を体系的に評価し、構造化されたレビューレポートを生成する。 「レビューして」「査読して」「実験結果を評価して」で発火。
科学技術・学術論文の執筆スキル。IMRaD 標準、Nature/Science 系、ACS 系、IEEE 系、 Elsevier 系のジャーナル形式に対応した論文構成・セクション設計・文章パターンを提供。 「論文を書いて」「Abstract を作成して」「Methods セクションを書いて」で発火。 assets/ に主要ジャーナル形式の Markdown テンプレートを同梱。
| name | scientific-advanced-visualization |
| description | 科学データ高度可視化スキル。Plotly インタラクティブ 3D ・ Altair 宣言的可視化・Seaborn 統計プロット・ アニメーション・Parallel Coordinates・出版品質図。 |
| tu_tools | [{"key":"biotools","name":"bio.tools","description":"高度可視化ツール検索"}] |
科学データのインタラクティブ可視化・3D レンダリング・ 出版品質図・アニメーションを提供する。
import numpy as np
import pandas as pd
def plotly_3d_scatter(df, x, y, z, color=None, size=None,
title="3D Scatter Plot"):
"""
Plotly 3D 散布図。
Parameters:
df: pd.DataFrame — データ
x, y, z: str — 軸カラム名
color: str | None — 色分けカラム
size: str | None — サイズカラム
title: str — タイトル
"""
import plotly.express as px
fig = px.scatter_3d(df, x=x, y=y, z=z, color=color, size=size,
title=title, opacity=0.7)
fig.update_layout(
scene=dict(
xaxis_title=x, yaxis_title=y, zaxis_title=z),
width=900, height=700)
path = "3d_scatter.html"
fig.write_html(path)
print(f"3D Scatter: {len(df)} points → {path}")
return fig
def plotly_surface(X_grid, Y_grid, Z_grid, title="Surface Plot"):
"""
Plotly 3D サーフェスプロット。
Parameters:
X_grid, Y_grid, Z_grid: np.ndarray — メッシュグリッド
title: str — タイトル
"""
import plotly.graph_objects as go
fig = go.Figure(data=[go.Surface(x=X_grid, y=Y_grid, z=Z_grid,
colorscale="Viridis")])
fig.update_layout(
title=title,
scene=dict(xaxis_title="X", yaxis_title="Y", zaxis_title="Z"),
width=900, height=700)
path = "surface_plot.html"
fig.write_html(path)
print(f"Surface: {Z_grid.shape} grid → {path}")
return fig
def altair_faceted_chart(df, x, y, color, facet_col=None,
chart_type="scatter"):
"""
Altair 宣言的ファセット付きチャート。
Parameters:
df: pd.DataFrame — データ
x, y: str — 軸カラム
color: str — 色分けカラム
facet_col: str | None — ファセットカラム
chart_type: str — "scatter" / "line" / "bar" / "box"
"""
import altair as alt
base = alt.Chart(df).encode(
x=alt.X(x, scale=alt.Scale(zero=False)),
y=alt.Y(y, scale=alt.Scale(zero=False)),
color=color)
if chart_type == "scatter":
chart = base.mark_circle(size=60, opacity=0.7)
elif chart_type == "line":
chart = base.mark_line()
elif chart_type == "bar":
chart = base.mark_bar()
elif chart_type == "box":
chart = base.mark_boxplot()
else:
chart = base.mark_circle()
if facet_col:
chart = chart.facet(facet_col, columns=3)
chart = chart.properties(width=300, height=250).interactive()
path = "altair_chart.html"
chart.save(path)
print(f"Altair {chart_type}: {len(df)} rows → {path}")
return chart
def parallel_coordinates_plot(df, class_col, features=None,
title="Parallel Coordinates"):
"""
Parallel Coordinates プロット。
Parameters:
df: pd.DataFrame — データ
class_col: str — 分類カラム
features: list[str] | None — 表示特徴量 (None で全数値)
title: str — タイトル
"""
import plotly.express as px
if features is None:
features = df.select_dtypes(include=[np.number]).columns.tolist()
if class_col in features:
features.remove(class_col)
fig = px.parallel_coordinates(
df, color=class_col, dimensions=features,
title=title, color_continuous_scale=px.colors.diverging.Tealrose)
fig.update_layout(width=1000, height=500)
path = "parallel_coordinates.html"
fig.write_html(path)
print(f"Parallel Coordinates: {len(features)} dims → {path}")
return fig
def radar_chart(categories, values_dict, title="Radar Chart"):
"""
Radar (Spider) チャート — 複数グループ比較。
Parameters:
categories: list[str] — 軸ラベル
values_dict: dict[str, list[float]] — {グループ名: 値リスト}
title: str — タイトル
"""
import plotly.graph_objects as go
fig = go.Figure()
for name, vals in values_dict.items():
fig.add_trace(go.Scatterpolar(
r=vals + [vals[0]],
theta=categories + [categories[0]],
fill="toself", name=name, opacity=0.6))
fig.update_layout(
polar=dict(radialaxis=dict(visible=True)),
title=title, width=600, height=500)
path = "radar_chart.html"
fig.write_html(path)
print(f"Radar: {len(values_dict)} groups × {len(categories)} axes → {path}")
return fig
def publication_figure(plot_func, figsize=(3.5, 2.8),
dpi=300, style="nature",
output="publication_fig.pdf"):
"""
出版品質 (Nature/Science style) 図生成。
Parameters:
plot_func: callable — matplotlib 描画関数 (ax を引数に取る)
figsize: tuple — 図サイズ (インチ, Nature 1 col = 3.5in)
dpi: int — 解像度
style: str — "nature" / "science" / "acs"
output: str — 出力パス (.pdf / .svg / .png)
"""
import matplotlib.pyplot as plt
import matplotlib as mpl
# Nature/Science スタイル設定
style_params = {
"nature": {
"font.family": "Arial",
"font.size": 7,
"axes.linewidth": 0.5,
"xtick.major.width": 0.5,
"ytick.major.width": 0.5,
"lines.linewidth": 1.0,
"lines.markersize": 3,
},
"science": {
"font.family": "Helvetica",
"font.size": 8,
"axes.linewidth": 0.6,
"xtick.major.width": 0.6,
"ytick.major.width": 0.6,
"lines.linewidth": 1.2,
"lines.markersize": 4,
},
"acs": {
"font.family": "Arial",
"font.size": 9,
"axes.linewidth": 0.5,
"xtick.major.width": 0.5,
"ytick.major.width": 0.5,
"lines.linewidth": 1.0,
"lines.markersize": 4,
}
}
with mpl.rc_context(style_params.get(style, style_params["nature"])):
fig, ax = plt.subplots(figsize=figsize)
plot_func(ax)
ax.spines["top"].set_visible(False)
ax.spines["right"].set_visible(False)
plt.tight_layout()
fig.savefig(output, dpi=dpi, bbox_inches="tight")
plt.close()
print(f"Publication figure ({style}): {figsize} @ {dpi}dpi → {output}")
return output
def create_animation(data_frames, x_col, y_col, time_col,
title="Animation", fps=10):
"""
Plotly アニメーション。
Parameters:
data_frames: pd.DataFrame — 時間列を含むデータ
x_col, y_col: str — 軸カラム
time_col: str — 時間 / フレームカラム
title: str — タイトル
fps: int — フレームレート
"""
import plotly.express as px
fig = px.scatter(data_frames, x=x_col, y=y_col,
animation_frame=time_col,
title=title, opacity=0.7,
range_x=[data_frames[x_col].min() * 0.9,
data_frames[x_col].max() * 1.1],
range_y=[data_frames[y_col].min() * 0.9,
data_frames[y_col].max() * 1.1])
fig.update_layout(
width=800, height=600,
updatemenus=[dict(type="buttons",
buttons=[dict(label="▶ Play",
method="animate",
args=[None, {"frame": {"duration": 1000 // fps}}])])])
path = "animation.html"
fig.write_html(path)
print(f"Animation: {data_frames[time_col].nunique()} frames @ {fps}fps → {path}")
return fig
eda-correlation → advanced-visualization → presentation-design
(探索的解析) (高度可視化) (プレゼンテーション)
│ │ ↓
pca-tsne ───────────────┘ interactive-dashboard
(次元削減) (ダッシュボード)
| ファイル | 説明 | 次スキル |
|---|---|---|
3d_scatter.html | インタラクティブ 3D 散布図 | → dashboard |
publication_fig.pdf | 出版品質図 | → presentation |
parallel_coordinates.html | 多変量可視化 | → reporting |
animation.html | アニメーション | → presentation |
| TU Key | ツール名 | 連携内容 |
|---|---|---|
biotools | bio.tools | 高度可視化ツール検索 |