Builds interactive Plotly Python charts (plotly.express/graph_objects) with hover tooltips, zoom/pan, animations, rangesliders, 3D rotation, and standalone HTML or Dash-embedded output. For static figures, defers to alterlab-matplotlib or alterlab-seaborn.
Python graphing library for creating interactive, publication-quality visualizations with 40+ chart types. Examples target plotly >= 6 and run on plotly 7.1 (plotly.js 4); see "Plotly 7 changes" below if you are upgrading older code.
Use this skill when the chart must be explored or shared interactively:
| Scenario | Use Instead |
|---|---|
| Static, print-ready figure with no interactivity | alterlab-matplotlib |
| Journal-formatted multi-panel figure (column widths, Okabe-Ito palette, significance stars) | alterlab-scientific-viz |
| Quick static statistical plot from a DataFrame (heatmap, pair plot, distributions) | alterlab-seaborn |
| Flowchart, pathway, or architecture diagram | alterlab-scientific-schematics / alterlab-mermaid |
Hand-off rule. When the request matches a row above, open your answer by naming that skill by its exact id (for example alterlab-matplotlib) and saying in one line why it fits better, then stop applying this skill's procedure. Name it even when you also need to ask for missing input. If only part of the request is out of scope, name the skill for that part and do only the in-scope part. A brief general pointer is fine; the named skill does the work.
Run Plotly without installing anything: uv resolves it per call, with no virtualenv (uv pip install fails outside one). Add --with pandas for DataFrames and --with statsmodels for OLS/LOWESS trendlines:
uv run --python ">=3.11" --with plotly --with pandas python make_chart.py
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()
For quick, standard visualizations with sensible defaults:
See references/plotly-express.md for complete guide.
For fine-grained control and custom visualizations:
See references/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
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, MapLibre-backed; the *_mapbox functions and traces were removed in plotly 7)
3D Charts: scatter3d, surface, mesh, cone, volume
Specialized: sunburst, treemap, sankey, parallel coordinates, gauge
For detailed examples and usage of all chart types, see references/chart-types.md.
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:
For complete layout and styling options, see references/layouts-styling.md.
Built-in interactive features:
# 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 references/export-interactivity.md.
Interactive HTML:
fig.write_html('chart.html') # Full standalone
fig.write_html('chart.html', include_plotlyjs='cdn') # Smaller file
Static Images (requires kaleido >= 1 and Chrome):
uv run --python ">=3.11" --with plotly --with kaleido python make_chart.py
uv run --python ">=3.11" --with plotly --with kaleido plotly_get_chrome # one-time: installs a Chrome build if the machine has none
fig.write_image('chart.png', scale=3) # PNG (700x500 default size -> 2100x1500 px)
fig.write_image('chart.pdf') # PDF
fig.write_image('chart.svg') # SVG
Without Chrome, write_image raises "Kaleido requires Google Chrome to be installed". Set export defaults with plotly.io.defaults (e.g. pio.defaults.default_scale = 2); the old pio.kaleido.scope settings no longer exist.
For complete export options, see references/export-interactivity.md.
When the chart is built in a script, the reply must still show how: quote the few lines that make it — the px/go call with its key arguments (e.g. trendline, hover_data/hovertemplate) and the export call with its arguments (fig.write_html(path, include_plotlyjs=...), fig.to_html(...) or fig.write_image(...)) — and give the path of every file written. Describing the chart in prose is not enough for someone who has to rebuild or adjust it.
import plotly.express as px
# Scatter plot with trendline (trendline='ols'/'lowess' requires statsmodels:
# add --with statsmodels to the uv run line)
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)])
# 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 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']
)])
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)
For interactive web applications, use Dash (Plotly's web app framework):
uv run --python ">=3.11" --with dash python app.py
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(debug=True) # Dash >= 3 (current 4.x): run_server() was removed; use app.run()
Plotly 7.0 moved to plotly.js 4 and removed long-deprecated APIs. When older code fails:
px.scatter_mapbox / density_mapbox / choropleth_mapbox / line_mapbox and the go.*mapbox traces are gone — use px.scatter_map, px.density_map, px.choropleth_map, px.line_map (MapLibre, map_style=, no token).create_annotated_heatmap, create_distplot, create_gantt, create_facet_grid, create_scatterplotmatrix, create_violin, create_candlestick, create_ohlc, and others). Use Plotly Express instead: px.imshow(z, text_auto=True), px.histogram(..., marginal='rug'), px.timeline, px.scatter_matrix, px.violin, go.Candlestick/go.Ohlc. ff.create_dendrogram, create_quiver, create_streamline, create_table, create_trisurf, and create_ternary_contour remain.engine= argument to write_image/to_image was removed.rgb()/rgba() with 0–1 fractional channels and hsv() are no longer supported; newer forms such as rgba(255 0 0 / 0.5), #ff0000aa, and oklch() now work.go.Quiver trace for vector fields.evals/evals.json (opens in a new tab)evals/fixtures/reaction_yield.csv (opens in a new tab)references/chart-types.md (opens in a new tab)references/export-interactivity.md (opens in a new tab)references/graph-objects.md (opens in a new tab)references/layouts-styling.md (opens in a new tab)references/plotly-express.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Not loaded · from alterlab-writing-tools
Claude Code won't load this skill
It ships in alterlab-writing-tools at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Generated from the plugin's indexed repository (alterlab-ieu/alterlab-academic-skills) — no native marketplace selected
npx claudepluginhub p/alterlab-ieu-alterlab-writing-tools2 plugins in one repository ship this exact skill · first indexed Nov 9, 2026
241 skills in this plugin
/alterlab-abm-mesaBuilds agent-based models of social systems with Mesa 3 — the current AgentSet API (model.agents.shuffle_do('step'), auto-assigned unique_id, mandatory super().__init__(rng=...)), cell spaces (mesa.discrete_space OrthogonalMooreGrid / classic mesa.space grids), the DataCollector, batch_run parameter sweeps, and SolaraViz — for emergence, segregation, diffusion, opinion dynamics, and cooperation models. It uses the Mesa 3.x API (the old mesa.time schedulers like RandomActivation are removed) and treats the model as a generative theory to be validated, not just run. Use when the request mentions an agent-based model, Mesa, simulating interacting agents, or emergent macro behavior from micro rules. For discrete-event (queueing/process) simulation prefer alterlab-simpy; for reinforcement learning prefer alterlab-stable-baselines3. Part of the AlterLab Academic Skills suite./alterlab-academic-careerPrepares academic career documents and professional-development materials for faculty and researchers. Use when drafting academic CVs, research statements, teaching philosophies, diversity statements, faculty-position cover letters, tenure dossiers, promotion narratives, academic portfolios, or mentorship statements, and when planning conference-networking strategy, building academic web presence, setting up ORCID profiles, or understanding impact metrics. Part of the AlterLab Academic Skills suite./alterlab-accreditation-aolScaffolds program-level Assurance-of-Learning (AoL) documentation for AACSB (Standard 5 in the 2020 standards and the 2026 Global Standards) and ABET (Criterion 3 Student Outcomes, Criterion 4 Continuous Improvement) accreditation — program learning outcomes / competency goals, curriculum-to-outcome mapping matrices, direct- and indirect-assessment plans, rubric design, and closing-the-loop continuous-improvement narratives — and validates the structure of an outcome-mapping matrix with scripts/aol_matrix.py. Use when the user needs AACSB or ABET assurance-of-learning material, a program-learning-outcomes set, a curriculum/outcome map or coverage matrix, a direct/indirect assessment plan, a closing-the-loop report, or accreditation self-study text. For single-course design or course rubrics prefer alterlab-teaching-design; for post-award grant reports prefer alterlab-grant-reporting. Part of the AlterLab Academic Skills suite./alterlab-adaptyvPrepares and validates Adaptyv Bio Foundry protein-testing submissions with no account — optimizes and pre-screens sequences locally (NetSolP/SoluProt heuristics, SolubleMPNN, ESM), assembles the experiment payload, and validates it offline against the Foundry's own type/method/sequence rules so it is ready and correct before it costs anything. Submitting to the Foundry, browsing the target catalog, tracking status and retrieving results run through the Foundry API with the user's own ADAPTYV_API_KEY (experiments cost money and take weeks). Use when designing proteins for wet-lab validation (binding/affinity, expression, thermostability, fluorescence), preparing or validating a Foundry submission, pre-screening sequences, or tracking an Adaptyv experiment. Triggers on "Adaptyv", "Foundry API", "cloud lab", "biolayer interferometry / BLI", "wet-lab validation". Part of the AlterLab Academic Skills suite./alterlab-aeonRuns time series machine learning with the aeon library — classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search via scikit-learn compatible APIs. Use when working with temporal data, sequential patterns, or time-indexed observations (univariate or multivariate) that need specialized algorithms beyond standard ML approaches. Part of the AlterLab Academic Skills suite./alterlab-ai-use-disclosureHelps faculty and researchers disclose generative-AI use and comply with the rules for manuscripts, grant proposals, peer review, theses and figures. Walks a venue → policy → placement decision tree over policies verified on 2026-09-23 (ICMJE, Springer Nature/Nature, Elsevier, Wiley, Taylor & Francis, Sage, IEEE, PLOS, arXiv; NIH NOT-OD-25-132 and NOT-OD-23-149, NSF, UKRI, ERC, TÜBİTAK; YÖK's 2024 ethics guide; EU AI Act Article 50), drafts English and Turkish statements, and ships scripts/disclosure_builder.py to emit a statement plus warnings where a policy forbids the use. Use when the request mentions an AI or ChatGPT disclosure or declaration, whether and where AI use must be declared, AI in peer review or grant review, AI-generated figures, AI rules for a thesis, or 'yapay zekâ kullanım beyanı'. For course AI policies and APA/MLA citations of ChatGPT prefer alterlab-syllabus-ai-policy; for writing the paper itself prefer alterlab-scientific-writing. Part of the AlterLab Academic Skills suite.Other plugins' skills for the same job