plotly

Create interactive Python charts with hover, zoom, and export to HTML or static images.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/gracefullight/cnn --skill plotly-gracefullight
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: plotly
Source: https://github.com/gracefullight/cnn/tree/main/.agents/skills/plotly
Command: npx skills add https://github.com/gracefullight/cnn --skill plotly-gracefullight

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires plotly, pandas, kaleido, dash, and includes references (resource) components.

What problem does it solve? Building interactive data visualizations in Python often requires juggling multiple libraries and verbose configuration. This Skill provides structured guidance for creating interactive, publication-quality charts with Plotly, covering both the high-level Plotly Express API and the low-level graph_objects API. ## Core Features & Use Cases - 40+ Chart Types: Scatter, line, bar, histogram, box, violin, heatmap, candlestick, choropleth maps, 3D surfaces, sunburst, treemap, and Sankey diagrams. - Two API Levels: Use Plotly Express for quick DataFrame-based charts in a few lines, or graph_objects for fine-grained control over traces, layouts, shapes, and annotations. - Interactivity & Export: Built-in hover tooltips, zoom, pan, rangesliders, animations, plus export to standalone HTML or static PNG/PDF/SVG via Kaleido. - Use Case: A data analyst needs an interactive dashboard showing stock prices with a rangeslider and range selector buttons. Using the candlestick chart guidance, they build a figure with hover data and export it as an embeddable HTML file. ## Quick Start Ask the AI to create an interactive scatter plot from your DataFrame using Plotly Express with hover tooltips and a trendline.

Frequently Asked Questions about plotly

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an interactive chart in Python with Plotly?▼

Use Plotly Express for quick charts: call px.scatter(df, x='x', y='y') with a pandas DataFrame, then fig.show(). For fine-grained control, use plotly.graph_objects to build figures trace by trace with add_trace() and update_layout().

Plotly Express vs graph_objects: which should I use?▼

Use Plotly Express for standard chart types with pandas DataFrames when you want automatic colors and legends in a few lines. Use graph_objects for chart types not in Express, complex multi-trace figures, or precise control over individual components.

How do I export a Plotly figure as PNG or PDF?▼

Install kaleido with uv pip install kaleido, then call fig.write_image('chart.png') or fig.write_image('chart.pdf'). Kaleido v1+ requires Chrome or Chromium on your system. You can set width, height, and scale for resolution.

Can Plotly charts be embedded in web pages?▼

Yes. Use fig.write_html('chart.html') for a standalone file, or fig.to_html(full_html=False, include_plotlyjs='cdn') to get an embeddable div for templates. For full interactive web apps, integrate figures with the Dash framework.

When should I use matplotlib instead of Plotly?▼

Use matplotlib or a scientific-visualization tool for static publication figures where interactivity is unnecessary. Plotly is best when you need hover info, zoom, pan, animations, or web-embeddable charts for dashboards and exploratory analysis.