python-dataviz
Professional data visualization using Python (matplotlib, seaborn, plotly). Create publication-quality static charts, statistical visualizations, and interactive plots. Use when generating charts/graphs/plots from data, creating infographics with data components, or producing scientific/statistical visualizations. Supports PNG/SVG (static) and HTML (interactive) export.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/matthew-a-gordon/python-datavizPython Data Visualization
Create professional charts, graphs, and statistical visualizations using Python's leading libraries.
Libraries & Use Cases
matplotlib - Static plots, publication-quality, full control
- Bar, line, scatter, pie, histogram, heatmap
- Multi-panel figures, subplots
- Custom styling, annotations
- Export: PNG, SVG, PDF
seaborn - Statistical visualizations, beautiful defaults
- Distribution plots (violin, box, kde, histogram)
- Categorical plots (bar, count, swarm, box)
- Relationship plots (scatter, line, regression)
- Matrix plots (heatmap, clustermap)
- Built on matplotlib, integrates seamlessly
plotly - Interactive charts, web-friendly
- Hover tooltips, zoom, pan
- 3D plots, animations
- Dashboards via Dash framework
- Export: HTML, PNG (requires kaleido)
Quick Start
Setup Environment
cd skills/python-dataviz
python3 -m venv .venv
source .venv/bin/activate
pip install .
Create a Chart
import matplotlib.pyplot as plt
import numpy as np
# Data
x = np.linspace(0, 10, 100)
y = np.sin(x)
# Plot
plt.figure(figsize=(10, 6))
plt.plot(x, y, linewidth=2, color='#667eea')
plt.title('Sine Wave', fontsize=16, fontweight='bold')
plt.xlabel('X Axis')
plt.ylabel('Y Axis')
plt.grid(alpha=0.3)
plt.tight_layout()
# Export
plt.savefig('output.png', dpi=300, bbox_inches='tight')
plt.savefig('output.svg', bbox_inches='tight')
Chart Selection Guide
Distribution/Statistical:
- Histogram →
plt.hist()orsns.histplot() - Box plot →
sns.boxplot() - Violin plot →
sns.violinplot() - KDE →
sns.kdeplot()
Comparison:
- Bar chart →
plt.bar()orsns.barplot() - Grouped bar →
sns.barplot(hue=...) - Horizontal bar →
plt.barh()orsns.barplot(orient='h')
Relationship:
- Scatter →
plt.scatter()orsns.scatterplot() - Line →
plt.plot()orsns.lineplot() - Regression →
sns.regplot()orsns.lmplot()
Heatmaps:
- Correlation matrix →
sns.heatmap(df.corr()) - 2D data →
plt.imshow()orsns.heatmap()
Interactive:
- Any plotly chart →
plotly.expressorplotly.graph_objects - See references/plotly-examples.md
Best Practices
1. Figure Size & DPI
plt.figure(figsize=(10, 6)) # Width x Height in inches
plt.savefig('output.png', dpi=300) # Publication: 300 dpi, Web: 72-150 dpi
2. Color Palettes
# Seaborn palettes (works with matplotlib too)
import seaborn as sns
sns.set_palette("husl") # Colorful
sns.set_palette("muted") # Soft
sns.set_palette("deep") # Bold
# Custom colors
colors = ['#667eea', '#764ba2', '#f6ad55', '#4299e1']
3. Styling
# Use seaborn styles even for matplotlib
import seaborn as sns
sns.set_theme() # Better defaults
sns.set_style("whitegrid") # Options: whitegrid, darkgrid, white, dark, ticks
# Or matplotlib styles
plt.style.use('ggplot') # Options: ggplot, seaborn, bmh, fivethirtyeight
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-matthew-a-gordon-python-dataviz": {
"enabled": true,
"auto_update": true
}
}
}