Professional data visualization using Python (matplotlib, seaborn, plotly). Create publication-quality static charts, statistical visualizations, and interac...
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install python-dataviz或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install python-dataviz⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/python-dataviz/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: python-dataviz description: 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. ---
Create professional charts, graphs, and statistical visualizations using Python's leading libraries.
matplotlib - Static plots, publication-quality, full control
seaborn - Statistical visualizations, beautiful defaults
plotly - Interactive charts, web-friendly
cd skills/python-dataviz
python3 -m venv .venv
source .venv/bin/activate
pip install .
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')
Distribution/Statistical:
plt.hist() or sns.histplot()sns.boxplot()sns.violinplot()sns.kdeplot()Comparison:
plt.bar() or sns.barplot()sns.barplot(hue=...)plt.barh() or sns.barplot(orient='h')Relationship:
plt.scatter() or sns.scatterplot()plt.plot() or sns.lineplot()sns.regplot() or sns.lmplot()Heatmaps:
sns.heatmap(df.corr())plt.imshow() or sns.heatmap()Interactive:
plotly.express or plotly.graph_objectsplt.figure(figsize=(10, 6)) # Width x Height in inches
plt.savefig('output.png', dpi=300) # Publication: 300 dpi, Web: 72-150 dpi
# 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']
# 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
fig, axes = plt.subplots(2, 2, figsize=(12, 10))
axes[0, 0].plot(x, y1)
axes[0, 1].plot(x, y2)
# etc.
plt.tight_layout() # Prevent label overlap
# PNG for sharing/embedding (raster)
plt.savefig('chart.png', dpi=300, bbox_inches='tight', transparent=False)
# SVG for editing/scaling (vector)
plt.savefig('chart.svg', bbox_inches='tight')
# For plotly (interactive)
import plotly.express as px
fig = px.scatter(df, x='col1', y='col2')
fig.write_html('chart.html')
See references/ for detailed guides:
See scripts/ for ready-to-use examples:
scripts/bar_chart.py - Bar and grouped bar chartsscripts/line_chart.py - Line plots with multiple seriesscripts/scatter_plot.py - Scatter plots with regressionscripts/heatmap.py - Correlation heatmapsscripts/distribution.py - Histograms, KDE, violin plotsscripts/interactive.py - Plotly interactive chartsimport pandas as pd
df = pd.read_csv('data.csv')
# Plot with pandas (uses matplotlib)
df.plot(x='date', y='value', kind='line', figsize=(10, 6))
plt.savefig('output.png', dpi=300)
# Or with seaborn for better styling
sns.lineplot(data=df, x='date', y='value')
plt.savefig('output.png', dpi=300)
data = {'Category A': 25, 'Category B': 40, 'Category C': 15}
# Matplotlib
plt.bar(data.keys(), data.values())
plt.savefig('output.png', dpi=300)
# Seaborn (convert to DataFrame)
import pandas as pd
df = pd.DataFrame(list(data.items()), columns=['Category', 'Value'])
sns.barplot(data=df, x='Category', y='Value')
plt.savefig('output.png', dpi=300)
import numpy as np
x = np.linspace(0, 10, 100)
y = np.sin(x)
plt.plot(x, y)
plt.savefig('output.png', dpi=300)
"No module named matplotlib"
cd skills/python-dataviz
source .venv/bin/activate
pip install -r requirements.txt
Blank output / "Figure is empty"
plt.savefig() comes AFTER plotting commandsplt.show() for interactive viewing during developmentLabels cut off
plt.tight_layout() # Add before plt.savefig()
# Or
plt.savefig('output.png', bbox_inches='tight')
Low resolution output
plt.savefig('output.png', dpi=300) # Not 72 or 100
The skill includes a venv with all dependencies. Always activate before use:
cd /home/matt/.openclaw/workspace/skills/python-dataviz
source .venv/bin/activate
Dependencies: matplotlib, seaborn, plotly, pandas, numpy, kaleido (for plotly static export)
安装 Python Dataviz 后,可以对 AI 说这些话来触发它
Help me get started with Python Dataviz
Explains what Python Dataviz does, walks through the setup, and runs a quick demo based on your current project
Use Python Dataviz to professional data visualization using Python (matplotlib, seaborn, ...
Invokes Python Dataviz with the right parameters and returns the result directly in the conversation
What can I do with Python Dataviz in my data & analytics workflow?
Lists the top use cases for Python Dataviz, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/python-dataviz/ 目录(个人级,所有项目可用),或 .claude/skills/python-dataviz/(项目级)。重启 AI 客户端后,用 /python-dataviz 主动调用,或让 AI 根据上下文自动发现并使用。
Python Dataviz 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Python Dataviz 可免费安装使用。请查阅仓库了解许可证信息。
Professional data visualization using Python (matplotlib, seaborn, plotly). Create publication-quality static charts, statistical visualizations, and interac...
Python Dataviz 属于「Data & Analytics」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my data & analytics tasks using Python Dataviz
Identifies repetitive steps in your workflow and sets up Python Dataviz to handle them automatically