plotly-interactive-visualizationlisted
Install: claude install-skill jaechang-hits/SciAgent-Skills
# Plotly — Interactive Scientific Visualization
## Overview
Plotly is a Python graphing library for interactive, web-embeddable visualizations with 40+ chart types. It provides two APIs: Plotly Express (high-level, pandas-native) for quick plots and Graph Objects (low-level) for full customization. Output to interactive HTML, static PNG/PDF/SVG, or Dash web apps.
## When to Use
- Creating interactive charts with hover tooltips, zoom, and pan
- Building multi-panel exploratory dashboards for data analysis
- Visualizing 3D data (surfaces, scatter3d, mesh, volume)
- Making geographic/map visualizations (choropleth, scatter_geo)
- Presenting data in web-embeddable HTML format
- Statistical distribution comparison (violin, box, histogram with marginals)
- Time series with range sliders and animation frames
- For **static publication-quality figures** (journal submissions), use `matplotlib` instead
- For **statistical grammar-of-graphics** style, use `seaborn` instead
## Prerequisites
- **Python packages**: `plotly`, `pandas`, `numpy`
- **For static export**: `kaleido` (PNG/PDF/SVG rendering)
- **For web apps**: `dash` (optional)
```bash
pip install plotly kaleido
```
## Quick Start
```python
import plotly.express as px
import pandas as pd
import numpy as np
# Sample data
np.random.seed(42)
df = pd.DataFrame({
"x": np.random.randn(200),
"y": np.random.randn(200),
"group": np.random.choice(["A", "B", "C"], 200),
"size": np.random.uniform(5, 20, 200),
})
fi