Skip to content
Skillpedia
Analysis & spreadsheets48k · #3844

plotly

Enables your agent to create interactive charts for data exploration. It's useful for hover info, zooming, and presenting information.

What it does

Plotly is a tool that creates interactive and beautiful charts for you. You can explore data, create presentations, and even dashboards with it.

When to use it

  • ✓When you want to see data details by hovering over a chart.
  • ✓When building a dashboard with multiple charts.
  • ✓For presentations where charts need to be interactive.

Example of what to ask your AI

“Create an interactive bar chart showing sales for each product.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/plotly/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/plotly/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

Plotly uses code to generate charts. You can choose between two ways to use it: Plotly Express, which is simpler and faster for common charts, or Graph Objects, which gives more control for complex charts.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add sickn33/agentic-awesome-skills --skill plotly

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/plotly/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Plotly

Python graphing library for creating interactive, publication-quality visualizations with 40+ chart types.

When to Use

  • You need interactive charts with hover, zoom, pan, or web embedding.
  • You are building dashboards, exploratory analysis notebooks, or presentations that benefit from rich interaction.
  • You want to choose between Plotly Express and Graph Objects for the same visualization task.

Quick Start

Install Plotly:

uv pip install plotly

Basic usage with Plotly Express (high-level API):

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 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 for complete guide.

Note: Plotly Express returns graph objects Figure, so you can combine approaches:

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.

2. Layouts and Styling

Subplots: Create multi-plot figures with shared axes:

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:

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.

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
# 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.

4. Export Options

Interactive HTML:

fig.write_html('chart.html')                       # Full standalone
fig.write_html('chart.html', include_plotlyjs='cdn')  # Smaller file

Static Images (requires kaleido):

uv pip install kaleido
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.

Common Workflows

Scientific Data Visualization

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')


…
FAQ

Can I save the charts to use elsewhere?

Yes, you can save charts as interactive HTML files or as static images (PNG, PDF, SVG).

Is Plotly good for scientific charts?

Yes, Plotly has many chart types for scientific data, such as heatmaps and 3D plots.

What's the difference between Plotly Express and Graph Objects?

Plotly Express is easier and faster for standard charts. Graph Objects offers more customization and control for advanced or unusual charts.

Details

Original description by the author

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.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3844
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills