visualization
Create publication-quality scientific figures and plots using Python (matplotlib, seaborn, plotly). Supports bar charts, scatter plots, heatmaps, box plots, violin plots, survival curves, network graphs, and more. Use when user asks to plot data, create figures, make charts, visualize results, or generate publication-ready graphics. Triggers on "plot", "chart", "figure", "graph", "visualize", "heatmap", "scatter plot", "bar chart", "histogram".
Best use case
visualization is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Create publication-quality scientific figures and plots using Python (matplotlib, seaborn, plotly). Supports bar charts, scatter plots, heatmaps, box plots, violin plots, survival curves, network graphs, and more. Use when user asks to plot data, create figures, make charts, visualize results, or generate publication-ready graphics. Triggers on "plot", "chart", "figure", "graph", "visualize", "heatmap", "scatter plot", "bar chart", "histogram".
Teams using visualization should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/visualization/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How visualization Compares
| Feature / Agent | visualization | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Create publication-quality scientific figures and plots using Python (matplotlib, seaborn, plotly). Supports bar charts, scatter plots, heatmaps, box plots, violin plots, survival curves, network graphs, and more. Use when user asks to plot data, create figures, make charts, visualize results, or generate publication-ready graphics. Triggers on "plot", "chart", "figure", "graph", "visualize", "heatmap", "scatter plot", "bar chart", "histogram".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Scientific Visualization
Publication-quality figures with Python. Use venv: `source /Users/zhangmingda/clawd/.venv/bin/activate`
## Style Defaults (journal-ready)
```python
import matplotlib.pyplot as plt
import matplotlib as mpl
import seaborn as sns
import numpy as np
# Publication style
plt.rcParams.update({
'font.size': 12,
'font.family': 'sans-serif',
'axes.linewidth': 1.2,
'axes.spines.top': False,
'axes.spines.right': False,
'figure.dpi': 150,
'savefig.dpi': 300,
'savefig.bbox': 'tight',
'savefig.transparent': True,
})
sns.set_palette("colorblind") # accessible colors
```
## Common Plot Types
### Distribution
```python
fig, ax = plt.subplots(figsize=(6, 4))
sns.histplot(data=df, x='value', hue='group', kde=True, ax=ax)
ax.set_xlabel('Value')
ax.set_ylabel('Count')
plt.savefig('dist.png', dpi=300)
```
### Comparison (box + strip)
```python
fig, ax = plt.subplots(figsize=(6, 4))
sns.boxplot(data=df, x='group', y='value', ax=ax, width=0.5)
sns.stripplot(data=df, x='group', y='value', ax=ax, color='black', alpha=0.3, size=3)
ax.set_ylabel('Measurement (units)')
plt.savefig('comparison.png', dpi=300)
```
### Scatter + Regression
```python
fig, ax = plt.subplots(figsize=(6, 5))
sns.regplot(data=df, x='x', y='y', ax=ax, scatter_kws={'alpha': 0.5})
r, p = stats.pearsonr(df['x'], df['y'])
ax.annotate(f'r = {r:.3f}, p = {p:.3g}', xy=(0.05, 0.95), xycoords='axes fraction', fontsize=10)
plt.savefig('scatter.png', dpi=300)
```
### Heatmap (correlation / expression)
```python
fig, ax = plt.subplots(figsize=(8, 6))
sns.heatmap(corr_matrix, annot=True, fmt='.2f', cmap='RdBu_r', center=0,
square=True, linewidths=0.5, ax=ax)
plt.savefig('heatmap.png', dpi=300)
```
### Multi-panel Figure
```python
fig, axes = plt.subplots(1, 3, figsize=(15, 4))
# Panel A
axes[0].plot(x, y)
axes[0].set_title('A', loc='left', fontweight='bold')
# Panel B
axes[1].bar(categories, values)
axes[1].set_title('B', loc='left', fontweight='bold')
# Panel C
axes[2].scatter(x2, y2)
axes[2].set_title('C', loc='left', fontweight='bold')
plt.tight_layout()
plt.savefig('figure1.png', dpi=300)
```
### Volcano Plot (genomics)
```python
fig, ax = plt.subplots(figsize=(7, 5))
colors = np.where((df['padj'] < 0.05) & (abs(df['log2FC']) > 1), 'red',
np.where(df['padj'] < 0.05, 'blue', 'grey'))
ax.scatter(df['log2FC'], -np.log10(df['padj']), c=colors, alpha=0.5, s=10)
ax.axhline(-np.log10(0.05), ls='--', color='grey', lw=0.8)
ax.axvline(-1, ls='--', color='grey', lw=0.8)
ax.axvline(1, ls='--', color='grey', lw=0.8)
ax.set_xlabel('log₂ Fold Change')
ax.set_ylabel('-log₁₀ adjusted p-value')
plt.savefig('volcano.png', dpi=300)
```
### Network Graph
```python
import networkx as nx
G = nx.from_pandas_edgelist(df, 'source', 'target', 'weight')
pos = nx.spring_layout(G, seed=42)
fig, ax = plt.subplots(figsize=(8, 8))
nx.draw_networkx(G, pos, ax=ax, node_size=300, font_size=8, edge_color='grey', alpha=0.7)
plt.savefig('network.png', dpi=300)
```
### Interactive (Plotly)
```python
import plotly.express as px
fig = px.scatter(df, x='x', y='y', color='group', hover_data=['label'],
title='Interactive Scatter')
fig.write_html('interactive.html')
fig.write_image('scatter.png', scale=2) # needs kaleido
```
## Journal Requirements
| Journal | Width (single col) | Width (double col) | Format | Font min |
|---------|-------------------|-------------------|--------|----------|
| Nature | 89mm | 183mm | PDF/EPS/TIFF | 5pt |
| Science | 85mm | 174mm | PDF/EPS | 6pt |
| PNAS | 87mm | 178mm | PDF/EPS/TIFF | 6pt |
| IEEE | 3.5in | 7.16in | PDF/EPS | 8pt |
| Elsevier | 90mm | 190mm | PDF/EPS/TIFF | 6pt |
```python
# Nature single-column figure
fig, ax = plt.subplots(figsize=(3.5, 2.6)) # 89mm ≈ 3.5in
```
## Accessibility
- Use colorblind-safe palettes: `sns.set_palette("colorblind")`
- Add patterns/markers in addition to color
- Ensure sufficient contrast
- Use descriptive axis labels with units
- Include alt text in figure captions
## Tips
- Save as both PNG (for preview) and PDF/SVG (for publication)
- Always label axes with units
- Use consistent color coding across related figures
- Avoid 3D plots unless data is truly 3D
- Minimize chart junk (unnecessary gridlines, borders, decorations)Related Skills
scientific-visualization
Meta-skill for publication-ready figures. Use when creating journal submission figures requiring multi-panel layouts, significance annotations, error bars, colorblind-safe palettes, and specific journal formatting (Nature, Science, Cell). Orchestrates matplotlib/seaborn/plotly with publication styles. For quick exploration use seaborn or plotly directly.
data-visualization-expert
COPYRIGHT NOTICE
data-visualization-biomedical
COPYRIGHT NOTICE
xurl
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
xlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
writing
No description provided.
world-bank-data
World Bank Open Data API for development indicators. Use when: user asks about GDP, population, poverty, health, or education statistics by country. NOT for: real-time financial data or stock prices.
wikipedia-search
Search and fetch structured content from Wikipedia using the MediaWiki API for reliable, encyclopedic information
wikidata-knowledge
Query Wikidata for structured knowledge using SPARQL and entity search. Use when: (1) finding structured facts about entities (people, places, organizations), (2) querying relationships between entities, (3) cross-referencing external identifiers (Wikipedia, VIAF, GND, ORCID), (4) building knowledge graphs from linked data. NOT for: full-text article content (use Wikipedia API), scientific literature (use semantic-scholar), geospatial data (use OpenStreetMap).
weather
Get current weather and forecasts via wttr.in or Open-Meteo. Use when: user asks about weather, temperature, or forecasts for any location. NOT for: historical weather data, severe weather alerts, or detailed meteorological analysis. No API key needed.
wacli
Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
voice-call
Start voice calls via the OpenClaw voice-call plugin.