plotly
Interactive visualization library. Use when you need hover info, zoom, pan, or web-embeddable charts. Best for dashboards, exploratory analysis, and presentations. For static publication figures use matplotlib or scientific-visualization.
下方技能配置(提示词、变量、安装步骤)保留英文原文。.aiskill 文件直接面向 AI 智能体,统一使用英文以确保跨平台行为一致。
概述
Interactive visualization library. Use when you need hover info, zoom, pan, or web-embeddable charts. Best for dashboards, exploratory analysis, and presentations. For static publication figures use matplotlib or scientific-visualization.
Source: https://github.com/DenDen047/claude-scientific-skills · MIT LICENSE · © 2025 K-Dense Inc.
系统提示词
定义智能体角色、规则与输出格式的指令块。
# Plotly
Python graphing library for creating interactive, publication-quality visualizations with 40+ chart types.
## Quick Start
Install Plotly:
```bash
uv pip install plotly
```
Basic usage with Plotly Express (high-level API):
```python
import plotly.express as px
import pandas as pd
df = pd.DataFrame({
'x': [1, 2, 3, 4],
'y': [10, 11, 12, 13]
})
fig = px.scatter(df, x='x', y='y', title='My First Plot')
fig.show()
```
## Choosing Between APIs
### Use Plotly Express (px)
For quick, standard visualizations with sensible defaults:
- Working with pandas DataFrames
- Creating common chart types (scatter, line, bar, histogram, etc.)
- Need automatic color encoding and legends
- Want minimal code (1-5 lines)
See [reference/plotly-express.md](reference/plotly-express.md) for complete guide.
### Use Graph Objects (go)
For fine-grained control and custom visualizations:
- Chart types not in Plotly Express (3D mesh, isosurface, complex financial charts)
- Building complex multi-trace figures from scratch
- Need precise control over individual components
- Creating specialized visualizations with custom shapes and annotations
See [reference/graph-objects.md](reference/graph-objects.md) for complete guide.
**Note:** Plotly Express returns graph objects Figure, so you can combine approaches:
```python
fig = px.scatter(df, x='x', y='y')
fig.update_layout(title='Custom Title') # Use go methods on px figure
fig.add_hline(y=10) # Add shapes
```
## Core Capabilities
### 1. Chart Types
Plotly supports 40+ chart types organized into categories:
**Basic Charts:** scatter, line, bar, pie, area, bubble
**Statistical Charts:** histogram, box plot, violin, distribution, error bars
**Scientific Charts:** heatmap, contour, ternary, image display
**Financial Charts:** candlestick, OHLC, waterfall, funnel, time series
**Maps:** scatter maps, choropleth, density maps (geographic visualization)
**3D Charts:** scatter3d, surface, mesh, cone, volume
**Specialized:** sunburst, treemap, sankey, parallel coordinates, gauge
For detailed examples and usage of all chart types, see [reference/chart-types.md](reference/chart-types.md).
### 2. Layouts and Styling
**Subplots:** Create multi-plot figures with shared axes:
```python
from plotly.subplots import make_subplots
import plotly.graph_objects as go
fig = make_subplots(rows=2, cols=2, subplot_titles=('A', 'B', 'C', 'D'))
fig.add_trace(go.Scatter(x=[1, 2], y=[3, 4]), row=1, col=1)
```
**Templates:** Apply coordinated styling:
```python
fig = px.scatter(df, x='x', y='y', template='plotly_dark')
# Built-in: plotly_white, plotly_dark, ggplot2, seaborn, simple_white
```
**Customization:** Control every aspect of appearance:
- Colors (discrete sequences, continuous scales)
- Fonts and text
- Axes (ranges, ticks, grids)
- Legends
- Margins and sizing
- Annotations and shapes
For complete layout and styling options, see [reference/layouts-styling.md](reference/layouts-styling.md).
### 3. Interactivity
Built-in interactive features:
- Hover tooltips with customizable data
- Pan and zoom
- Legend toggling
- Box/lasso selection
- Rangesliders for time series
- Buttons and dropdowns
- Animations
```python
# Custom hover template
fig.update_traces(
hovertemplate='<b>%{x}</b><br>Value: %{y:.2f}<extra></extra>'
)
# Add rangeslider
fig.update_xaxes(rangeslider_visible=True)
# Animations
fig = px.scatter(df, x='x', y='y', animation_frame='year')
```
For complete interactivity guide, see [reference/export-interactivity.md](reference/export-interactivity.md).
### 4. Export Options
**Interactive HTML:**
```python
fig.write_html('chart.html') # Full standalone
fig.write_html('chart.html', include_plotlyjs='cdn') # Smaller file
```
**Static Images (requires kaleido):**
```bash
uv pip install kaleido
```
```python
fig.write_image('chart.png') # PNG
fig.write_image('chart.pdf') # PDF
fig.write_image('chart.svg') # SVG
```
For complete export options, see [reference/export-interactivity.md](reference/export-interactivity.md).
## Common Workflows
### Scientific Data Visualization
```python
import plotly.express as px
# Scatter plot with trendline
fig = px.scatter(df, x='temperature', y='yield', trendline='ols')
# Heatmap from matrix
fig = px.imshow(correlation_matrix, text_auto=True, color_continuous_scale='RdBu')
# 3D surface plot
import plotly.graph_objects as go
fig = go.Figure(data=[go.Surface(z=z_data, x=x_data, y=y_data)])
```
### Statistical Analysis
```python
# Distribution comparison
fig = px.histogram(df, x='values', color='group', marginal='box', nbins=30)
# Box plot with all points
fig = px.box(df, x='category', y='value', points='all')
# Violin plot
fig = px.violin(df, x='group', y='measurement', box=True)
```
### Time Series and Financial
```python
# Time series with rangeslider
fig = px.line(df, x='date', y='price')
fig.update_xaxes(rangeslider_visible=True)
# Candlestick chart
import plotly.graph_objects as go
fig = go.Figure(data=[go.Candlestick(
x=df['date'],
open=df['open'],
high=df['high'],
low=df['low'],
close=df['close']
)])
```
### Multi-Plot Dashboards
```python
from plotly.subplots import make_subplots
import plotly.graph_objects as go
fig = make_subplots(
rows=2, cols=2,
subplot_titles=('Scatter', 'Bar', 'Histogram', 'Box'),
specs=[[{'type': 'scatter'}, {'type': 'bar'}],
[{'type': 'histogram'}, {'type': 'box'}]]
)
fig.add_trace(go.Scatter(x=[1, 2, 3], y=[4, 5, 6]), row=1, col=1)
fig.add_trace(go.Bar(x=['A', 'B'], y=[1, 2]), row=1, col=2)
fig.add_trace(go.Histogram(x=data), row=2, col=1)
fig.add_trace(go.Box(y=data), row=2, col=2)
fig.update_layout(height=800, showlegend=False)
```
## Integration with Dash
For interactive web applications, use Dash (Plotly's web app framework):
```bash
uv pip install dash
```
```python
import dash
from dash import dcc, html
import plotly.express as px
app = dash.Dash(__name__)
fig = px.scatter(df, x='x', y='y')
app.layout = html.Div([
html.H1('Dashboard'),
dcc.Graph(figure=fig)
])
app.run_server(debug=True)
```
## Reference Files
- **[plotly-express.md](reference/plotly-express.md)** - High-level API for quick visualizations
- **[graph-objects.md](reference/graph-objects.md)** - Low-level API for fine-grained control
- **[chart-types.md](reference/chart-types.md)** - Complete catalog of 40+ chart types with examples
- **[layouts-styling.md](reference/layouts-styling.md)** - Subplots, templates, colors, customization
- **[export-interactivity.md](reference/export-interactivity.md)** - Export options and interactive features
## Additional Resources
- Official documentation: https://plotly.com/python/
- API reference: https://plotly.com/python-api-reference/
- Community forum: https://community.plotly.com/ 用户提示词模板
填充变量后发送,即可运行该技能: {{variables}}
变量
| 名称 | 必填 | 说明 | 示例 |
|---|
完整技能配置
标准 .aiskill 文件,提供 JSON 与 YAML 两种格式。
{
"format": "aiskill/v1",
"skill": {
"name": "plotly",
"slug": "plotly",
"version": "1.0.0",
"description": "Interactive visualization library. Use when you need hover info, zoom, pan, or web-embeddable charts. Best for dashboards, exploratory analysis, and presentations. For static publication figures use matplotlib or scientific-visualization.",
"category": "Research",
"tags": [
"research-science",
"data-viz"
],
"platforms": [
"chatgpt",
"claude-code",
"cursor"
],
"tested_environment": "Agent Skills convention (SKILL.md) — works with Claude Code, Cursor, ChatGPT/Codex and compatible agents",
"license": "MIT LICENSE"
},
"prompts": {
"system": "# Plotly\r\n\r\nPython graphing library for creating interactive, publication-quality visualizations with 40+ chart types.\r\n\r\n## Quick Start\r\n\r\nInstall Plotly:\r\n```bash\r\nuv pip install plotly\r\n```\r\n\r\nBasic usage with Plotly Express (high-level API):\r\n```python\r\nimport plotly.express as px\r\nimport pandas as pd\r\n\r\ndf = pd.DataFrame({\r\n 'x': [1, 2, 3, 4],\r\n 'y': [10, 11, 12, 13]\r\n})\r\n\r\nfig = px.scatter(df, x='x', y='y', title='My First Plot')\r\nfig.show()\r\n```\r\n\r\n## Choosing Between APIs\r\n\r\n### Use Plotly Express (px)\r\nFor quick, standard visualizations with sensible defaults:\r\n- Working with pandas DataFrames\r\n- Creating common chart types (scatter, line, bar, histogram, etc.)\r\n- Need automatic color encoding and legends\r\n- Want minimal code (1-5 lines)\r\n\r\nSee [reference/plotly-express.md](reference/plotly-express.md) for complete guide.\r\n\r\n### Use Graph Objects (go)\r\nFor fine-grained control and custom visualizations:\r\n- Chart types not in Plotly Express (3D mesh, isosurface, complex financial charts)\r\n- Building complex multi-trace figures from scratch\r\n- Need precise control over individual components\r\n- Creating specialized visualizations with custom shapes and annotations\r\n\r\nSee [reference/graph-objects.md](reference/graph-objects.md) for complete guide.\r\n\r\n**Note:** Plotly Express returns graph objects Figure, so you can combine approaches:\r\n```python\r\nfig = px.scatter(df, x='x', y='y')\r\nfig.update_layout(title='Custom Title') # Use go methods on px figure\r\nfig.add_hline(y=10) # Add shapes\r\n```\r\n\r\n## Core Capabilities\r\n\r\n### 1. Chart Types\r\n\r\nPlotly supports 40+ chart types organized into categories:\r\n\r\n**Basic Charts:** scatter, line, bar, pie, area, bubble\r\n\r\n**Statistical Charts:** histogram, box plot, violin, distribution, error bars\r\n\r\n**Scientific Charts:** heatmap, contour, ternary, image display\r\n\r\n**Financial Charts:** candlestick, OHLC, waterfall, funnel, time series\r\n\r\n**Maps:** scatter maps, choropleth, density maps (geographic visualization)\r\n\r\n**3D Charts:** scatter3d, surface, mesh, cone, volume\r\n\r\n**Specialized:** sunburst, treemap, sankey, parallel coordinates, gauge\r\n\r\nFor detailed examples and usage of all chart types, see [reference/chart-types.md](reference/chart-types.md).\r\n\r\n### 2. Layouts and Styling\r\n\r\n**Subplots:** Create multi-plot figures with shared axes:\r\n```python\r\nfrom plotly.subplots import make_subplots\r\nimport plotly.graph_objects as go\r\n\r\nfig = make_subplots(rows=2, cols=2, subplot_titles=('A', 'B', 'C', 'D'))\r\nfig.add_trace(go.Scatter(x=[1, 2], y=[3, 4]), row=1, col=1)\r\n```\r\n\r\n**Templates:** Apply coordinated styling:\r\n```python\r\nfig = px.scatter(df, x='x', y='y', template='plotly_dark')\r\n# Built-in: plotly_white, plotly_dark, ggplot2, seaborn, simple_white\r\n```\r\n\r\n**Customization:** Control every aspect of appearance:\r\n- Colors (discrete sequences, continuous scales)\r\n- Fonts and text\r\n- Axes (ranges, ticks, grids)\r\n- Legends\r\n- Margins and sizing\r\n- Annotations and shapes\r\n\r\nFor complete layout and styling options, see [reference/layouts-styling.md](reference/layouts-styling.md).\r\n\r\n### 3. Interactivity\r\n\r\nBuilt-in interactive features:\r\n- Hover tooltips with customizable data\r\n- Pan and zoom\r\n- Legend toggling\r\n- Box/lasso selection\r\n- Rangesliders for time series\r\n- Buttons and dropdowns\r\n- Animations\r\n\r\n```python\r\n# Custom hover template\r\nfig.update_traces(\r\n hovertemplate='<b>%{x}</b><br>Value: %{y:.2f}<extra></extra>'\r\n)\r\n\r\n# Add rangeslider\r\nfig.update_xaxes(rangeslider_visible=True)\r\n\r\n# Animations\r\nfig = px.scatter(df, x='x', y='y', animation_frame='year')\r\n```\r\n\r\nFor complete interactivity guide, see [reference/export-interactivity.md](reference/export-interactivity.md).\r\n\r\n### 4. Export Options\r\n\r\n**Interactive HTML:**\r\n```python\r\nfig.write_html('chart.html') # Full standalone\r\nfig.write_html('chart.html', include_plotlyjs='cdn') # Smaller file\r\n```\r\n\r\n**Static Images (requires kaleido):**\r\n```bash\r\nuv pip install kaleido\r\n```\r\n\r\n```python\r\nfig.write_image('chart.png') # PNG\r\nfig.write_image('chart.pdf') # PDF\r\nfig.write_image('chart.svg') # SVG\r\n```\r\n\r\nFor complete export options, see [reference/export-interactivity.md](reference/export-interactivity.md).\r\n\r\n## Common Workflows\r\n\r\n### Scientific Data Visualization\r\n\r\n```python\r\nimport plotly.express as px\r\n\r\n# Scatter plot with trendline\r\nfig = px.scatter(df, x='temperature', y='yield', trendline='ols')\r\n\r\n# Heatmap from matrix\r\nfig = px.imshow(correlation_matrix, text_auto=True, color_continuous_scale='RdBu')\r\n\r\n# 3D surface plot\r\nimport plotly.graph_objects as go\r\nfig = go.Figure(data=[go.Surface(z=z_data, x=x_data, y=y_data)])\r\n```\r\n\r\n### Statistical Analysis\r\n\r\n```python\r\n# Distribution comparison\r\nfig = px.histogram(df, x='values', color='group', marginal='box', nbins=30)\r\n\r\n# Box plot with all points\r\nfig = px.box(df, x='category', y='value', points='all')\r\n\r\n# Violin plot\r\nfig = px.violin(df, x='group', y='measurement', box=True)\r\n```\r\n\r\n### Time Series and Financial\r\n\r\n```python\r\n# Time series with rangeslider\r\nfig = px.line(df, x='date', y='price')\r\nfig.update_xaxes(rangeslider_visible=True)\r\n\r\n# Candlestick chart\r\nimport plotly.graph_objects as go\r\nfig = go.Figure(data=[go.Candlestick(\r\n x=df['date'],\r\n open=df['open'],\r\n high=df['high'],\r\n low=df['low'],\r\n close=df['close']\r\n)])\r\n```\r\n\r\n### Multi-Plot Dashboards\r\n\r\n```python\r\nfrom plotly.subplots import make_subplots\r\nimport plotly.graph_objects as go\r\n\r\nfig = make_subplots(\r\n rows=2, cols=2,\r\n subplot_titles=('Scatter', 'Bar', 'Histogram', 'Box'),\r\n specs=[[{'type': 'scatter'}, {'type': 'bar'}],\r\n [{'type': 'histogram'}, {'type': 'box'}]]\r\n)\r\n\r\nfig.add_trace(go.Scatter(x=[1, 2, 3], y=[4, 5, 6]), row=1, col=1)\r\nfig.add_trace(go.Bar(x=['A', 'B'], y=[1, 2]), row=1, col=2)\r\nfig.add_trace(go.Histogram(x=data), row=2, col=1)\r\nfig.add_trace(go.Box(y=data), row=2, col=2)\r\n\r\nfig.update_layout(height=800, showlegend=False)\r\n```\r\n\r\n## Integration with Dash\r\n\r\nFor interactive web applications, use Dash (Plotly's web app framework):\r\n\r\n```bash\r\nuv pip install dash\r\n```\r\n\r\n```python\r\nimport dash\r\nfrom dash import dcc, html\r\nimport plotly.express as px\r\n\r\napp = dash.Dash(__name__)\r\n\r\nfig = px.scatter(df, x='x', y='y')\r\n\r\napp.layout = html.Div([\r\n html.H1('Dashboard'),\r\n dcc.Graph(figure=fig)\r\n])\r\n\r\napp.run_server(debug=True)\r\n```\r\n\r\n## Reference Files\r\n\r\n- **[plotly-express.md](reference/plotly-express.md)** - High-level API for quick visualizations\r\n- **[graph-objects.md](reference/graph-objects.md)** - Low-level API for fine-grained control\r\n- **[chart-types.md](reference/chart-types.md)** - Complete catalog of 40+ chart types with examples\r\n- **[layouts-styling.md](reference/layouts-styling.md)** - Subplots, templates, colors, customization\r\n- **[export-interactivity.md](reference/export-interactivity.md)** - Export options and interactive features\r\n\r\n## Additional Resources\r\n\r\n- Official documentation: https://plotly.com/python/\r\n- API reference: https://plotly.com/python-api-reference/\r\n- Community forum: https://community.plotly.com/",
"user_template": ""
},
"variables": [],
"install": {
"steps": [
{
"title": "Download & unzip",
"detail": "Download the .zip package from SkillVault and unzip it. The plotly/ folder contains SKILL.md plus any companion scripts, references and assets."
},
{
"title": "Copy into your agent skills directory",
"detail": "Move the folder into your agent's skills directory — e.g. ~/.claude/skills/ (Claude Code), .codex/skills/, .cursor/skills/ or your project's .claude/skills/ folder — then restart or reload the session."
},
{
"title": "Use it",
"detail": "Describe the task in natural language; the agent loads the skill automatically when the request matches the skill description."
}
]
},
"usage": {
"steps": []
},
"metadata": {
"author": "SkillVault",
"source": "https://skillvault.top/skills/plotly",
"exported_at": "2026-11-03T07:40:55.891Z"
}
} format: aiskill/v1
skill:
name: plotly
slug: plotly
version: 1.0.0
description: >-
Interactive visualization library. Use when you need hover info, zoom, pan, or web-embeddable
charts. Best for dashboards, exploratory analysis, and presentations. For static publication
figures use matplotlib or scientific-visualization.
category: Research
tags:
- research-science
- data-viz
platforms:
- chatgpt
- claude-code
- cursor
tested_environment: >-
Agent Skills convention (SKILL.md) — works with Claude Code, Cursor, ChatGPT/Codex and
compatible agents
license: MIT LICENSE
prompts:
system: "# Plotly\r\n\r\nPython graphing library for creating interactive, publication-quality visualizations with 40+ chart types.\r\n\r\n## Quick Start\r\n\r\nInstall Plotly:\r\n```bash\r\nuv pip install plotly\r\n```\r\n\r\nBasic usage with Plotly Express (high-level API):\r\n```python\r\nimport plotly.express as px\r\nimport pandas as pd\r\n\r\ndf = pd.DataFrame({\r\n 'x': [1, 2, 3, 4],\r\n 'y': [10, 11, 12, 13]\r\n})\r\n\r\nfig = px.scatter(df, x='x', y='y', title='My First Plot')\r\nfig.show()\r\n```\r\n\r\n## Choosing Between APIs\r\n\r\n### Use Plotly Express (px)\r\nFor quick, standard visualizations with sensible defaults:\r\n- Working with pandas DataFrames\r\n- Creating common chart types (scatter, line, bar, histogram, etc.)\r\n- Need automatic color encoding and legends\r\n- Want minimal code (1-5 lines)\r\n\r\nSee [reference/plotly-express.md](reference/plotly-express.md) for complete guide.\r\n\r\n### Use Graph Objects (go)\r\nFor fine-grained control and custom visualizations:\r\n- Chart types not in Plotly Express (3D mesh, isosurface, complex financial charts)\r\n- Building complex multi-trace figures from scratch\r\n- Need precise control over individual components\r\n- Creating specialized visualizations with custom shapes and annotations\r\n\r\nSee [reference/graph-objects.md](reference/graph-objects.md) for complete guide.\r\n\r\n**Note:** Plotly Express returns graph objects Figure, so you can combine approaches:\r\n```python\r\nfig = px.scatter(df, x='x', y='y')\r\nfig.update_layout(title='Custom Title') # Use go methods on px figure\r\nfig.add_hline(y=10) # Add shapes\r\n```\r\n\r\n## Core Capabilities\r\n\r\n### 1. Chart Types\r\n\r\nPlotly supports 40+ chart types organized into categories:\r\n\r\n**Basic Charts:** scatter, line, bar, pie, area, bubble\r\n\r\n**Statistical Charts:** histogram, box plot, violin, distribution, error bars\r\n\r\n**Scientific Charts:** heatmap, contour, ternary, image display\r\n\r\n**Financial Charts:** candlestick, OHLC, waterfall, funnel, time series\r\n\r\n**Maps:** scatter maps, choropleth, density maps (geographic visualization)\r\n\r\n**3D Charts:** scatter3d, surface, mesh, cone, volume\r\n\r\n**Specialized:** sunburst, treemap, sankey, parallel coordinates, gauge\r\n\r\nFor detailed examples and usage of all chart types, see [reference/chart-types.md](reference/chart-types.md).\r\n\r\n### 2. Layouts and Styling\r\n\r\n**Subplots:** Create multi-plot figures with shared axes:\r\n```python\r\nfrom plotly.subplots import make_subplots\r\nimport plotly.graph_objects as go\r\n\r\nfig = make_subplots(rows=2, cols=2, subplot_titles=('A', 'B', 'C', 'D'))\r\nfig.add_trace(go.Scatter(x=[1, 2], y=[3, 4]), row=1, col=1)\r\n```\r\n\r\n**Templates:** Apply coordinated styling:\r\n```python\r\nfig = px.scatter(df, x='x', y='y', template='plotly_dark')\r\n# Built-in: plotly_white, plotly_dark, ggplot2, seaborn, simple_white\r\n```\r\n\r\n**Customization:** Control every aspect of appearance:\r\n- Colors (discrete sequences, continuous scales)\r\n- Fonts and text\r\n- Axes (ranges, ticks, grids)\r\n- Legends\r\n- Margins and sizing\r\n- Annotations and shapes\r\n\r\nFor complete layout and styling options, see [reference/layouts-styling.md](reference/layouts-styling.md).\r\n\r\n### 3. Interactivity\r\n\r\nBuilt-in interactive features:\r\n- Hover tooltips with customizable data\r\n- Pan and zoom\r\n- Legend toggling\r\n- Box/lasso selection\r\n- Rangesliders for time series\r\n- Buttons and dropdowns\r\n- Animations\r\n\r\n```python\r\n# Custom hover template\r\nfig.update_traces(\r\n hovertemplate='<b>%{x}</b><br>Value: %{y:.2f}<extra></extra>'\r\n)\r\n\r\n# Add rangeslider\r\nfig.update_xaxes(rangeslider_visible=True)\r\n\r\n# Animations\r\nfig = px.scatter(df, x='x', y='y', animation_frame='year')\r\n```\r\n\r\nFor complete interactivity guide, see [reference/export-interactivity.md](reference/export-interactivity.md).\r\n\r\n### 4. Export Options\r\n\r\n**Interactive HTML:**\r\n```python\r\nfig.write_html('chart.html') # Full standalone\r\nfig.write_html('chart.html', include_plotlyjs='cdn') # Smaller file\r\n```\r\n\r\n**Static Images (requires kaleido):**\r\n```bash\r\nuv pip install kaleido\r\n```\r\n\r\n```python\r\nfig.write_image('chart.png') # PNG\r\nfig.write_image('chart.pdf') # PDF\r\nfig.write_image('chart.svg') # SVG\r\n```\r\n\r\nFor complete export options, see [reference/export-interactivity.md](reference/export-interactivity.md).\r\n\r\n## Common Workflows\r\n\r\n### Scientific Data Visualization\r\n\r\n```python\r\nimport plotly.express as px\r\n\r\n# Scatter plot with trendline\r\nfig = px.scatter(df, x='temperature', y='yield', trendline='ols')\r\n\r\n# Heatmap from matrix\r\nfig = px.imshow(correlation_matrix, text_auto=True, color_continuous_scale='RdBu')\r\n\r\n# 3D surface plot\r\nimport plotly.graph_objects as go\r\nfig = go.Figure(data=[go.Surface(z=z_data, x=x_data, y=y_data)])\r\n```\r\n\r\n### Statistical Analysis\r\n\r\n```python\r\n# Distribution comparison\r\nfig = px.histogram(df, x='values', color='group', marginal='box', nbins=30)\r\n\r\n# Box plot with all points\r\nfig = px.box(df, x='category', y='value', points='all')\r\n\r\n# Violin plot\r\nfig = px.violin(df, x='group', y='measurement', box=True)\r\n```\r\n\r\n### Time Series and Financial\r\n\r\n```python\r\n# Time series with rangeslider\r\nfig = px.line(df, x='date', y='price')\r\nfig.update_xaxes(rangeslider_visible=True)\r\n\r\n# Candlestick chart\r\nimport plotly.graph_objects as go\r\nfig = go.Figure(data=[go.Candlestick(\r\n x=df['date'],\r\n open=df['open'],\r\n high=df['high'],\r\n low=df['low'],\r\n close=df['close']\r\n)])\r\n```\r\n\r\n### Multi-Plot Dashboards\r\n\r\n```python\r\nfrom plotly.subplots import make_subplots\r\nimport plotly.graph_objects as go\r\n\r\nfig = make_subplots(\r\n rows=2, cols=2,\r\n subplot_titles=('Scatter', 'Bar', 'Histogram', 'Box'),\r\n specs=[[{'type': 'scatter'}, {'type': 'bar'}],\r\n [{'type': 'histogram'}, {'type': 'box'}]]\r\n)\r\n\r\nfig.add_trace(go.Scatter(x=[1, 2, 3], y=[4, 5, 6]), row=1, col=1)\r\nfig.add_trace(go.Bar(x=['A', 'B'], y=[1, 2]), row=1, col=2)\r\nfig.add_trace(go.Histogram(x=data), row=2, col=1)\r\nfig.add_trace(go.Box(y=data), row=2, col=2)\r\n\r\nfig.update_layout(height=800, showlegend=False)\r\n```\r\n\r\n## Integration with Dash\r\n\r\nFor interactive web applications, use Dash (Plotly's web app framework):\r\n\r\n```bash\r\nuv pip install dash\r\n```\r\n\r\n```python\r\nimport dash\r\nfrom dash import dcc, html\r\nimport plotly.express as px\r\n\r\napp = dash.Dash(__name__)\r\n\r\nfig = px.scatter(df, x='x', y='y')\r\n\r\napp.layout = html.Div([\r\n html.H1('Dashboard'),\r\n dcc.Graph(figure=fig)\r\n])\r\n\r\napp.run_server(debug=True)\r\n```\r\n\r\n## Reference Files\r\n\r\n- **[plotly-express.md](reference/plotly-express.md)** - High-level API for quick visualizations\r\n- **[graph-objects.md](reference/graph-objects.md)** - Low-level API for fine-grained control\r\n- **[chart-types.md](reference/chart-types.md)** - Complete catalog of 40+ chart types with examples\r\n- **[layouts-styling.md](reference/layouts-styling.md)** - Subplots, templates, colors, customization\r\n- **[export-interactivity.md](reference/export-interactivity.md)** - Export options and interactive features\r\n\r\n## Additional Resources\r\n\r\n- Official documentation: https://plotly.com/python/\r\n- API reference: https://plotly.com/python-api-reference/\r\n- Community forum: https://community.plotly.com/"
user_template: ""
variables: []
install:
steps:
- title: Download & unzip
detail: >-
Download the .zip package from SkillVault and unzip it. The plotly/ folder contains SKILL.md
plus any companion scripts, references and assets.
- title: Copy into your agent skills directory
detail: >-
Move the folder into your agent's skills directory — e.g. ~/.claude/skills/ (Claude Code),
.codex/skills/, .cursor/skills/ or your project's .claude/skills/ folder — then restart or
reload the session.
- title: Use it
detail: >-
Describe the task in natural language; the agent loads the skill automatically when the
request matches the skill description.
usage:
steps: []
metadata:
author: SkillVault
source: https://skillvault.top/skills/plotly
exported_at: "2026-11-03T07:40:55.891Z"
安装指南
- 1
Download & unzip
Download the .zip package from SkillVault and unzip it. The plotly/ folder contains SKILL.md plus any companion scripts, references and assets.
- 2
Copy into your agent skills directory
Move the folder into your agent's skills directory — e.g. ~/.claude/skills/ (Claude Code), .codex/skills/, .cursor/skills/ or your project's .claude/skills/ folder — then restart or reload the session.
- 3
Use it
Describe the task in natural language; the agent loads the skill automatically when the request matches the skill description.
使用方法
平台兼容性
相关技能
markdown-mermaid-writing
Comprehensive markdown and Mermaid diagram writing skill. Use when creating any scientific document, report, analysis, or visualization. Establishes text-based diagrams as the default documentation standard with full style guides (markdown + mermaid), 24 diagram type references, and 9 document templates.
matlab
MATLAB and GNU Octave numerical computing for matrix operations, data analysis, visualization, and scientific computing. Use when writing MATLAB/Octave scripts for linear algebra, signal processing, image processing, differential equations, optimization, statistics, or creating scientific visualizations. Also use when the user needs help with MATLAB syntax, functions, or wants to convert between MATLAB and Python code. Scripts can be executed with MATLAB or the open-source GNU Octave interpreter.
matplotlib
Low-level plotting library for full customization. Use when you need fine-grained control over every plot element, creating novel plot types, or integrating with specific scientific workflows. Export to PNG/PDF/SVG for publication. For quick statistical plots use seaborn; for interactive plots use plotly; for publication-ready multi-panel figures with journal styling, use scientific-visualization.