scientific-skills/Others/plotly/SKILL.md
Interactive visualization library for Python. Use it when you need hover tooltips, zoom/pan, selection, animations, or charts embeddable in web pages (e.g., dashboards, exploratory analysis, presentations).
npx skillsauth add aipoch/medical-research-skills plotlyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
references/ for task-specific guidance.Python: 3.10+. Repository baseline for current packaged skills.Third-party packages: not explicitly version-pinned in this skill package. Add pinned versions if this skill needs stricter environment control.Skill directory: 20260316/scientific-skills/Others/plotly
No packaged executable script was detected.
Use the documented workflow in SKILL.md together with the references/assets in this folder.
Example run plan:
SKILL.md.references/ contains supporting rules, prompts, or checklists.Use Plotly when you need interactive, shareable visualizations, especially in these scenarios:
If you only need static publication figures, consider Matplotlib or other scientific visualization tools.
plotly.express, px): high-level, concise API for common charts from DataFrames.plotly.graph_objects, go): low-level building blocks for full control and custom figures.Figure, so you can mix both styles.make_subplots)plotly_dark, plotly_white)write_html)write_image)Reference guides (optional reading):
reference/plotly-express.mdreference/graph-objects.mdreference/chart-types.mdreference/layouts-styling.mdreference/export-interactivity.mdplotly>=5.0pandas>=1.5 (recommended for DataFrame-based workflows)kaleido>=0.2 (optional, required for static image export: PNG/SVG/PDF)dash>=2.0 (optional, for building interactive web apps)A complete runnable example demonstrating: Plotly Express + Graph Objects updates, hover customization, subplots, and export.
uv pip install "plotly>=5.0" "pandas>=1.5" "kaleido>=0.2"
import pandas as pd
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
def main():
# Sample dataset
df = pd.DataFrame(
{
"x": [1, 2, 3, 4, 5],
"y": [10, 11, 12, 11.5, 13],
"group": ["A", "A", "B", "B", "B"],
}
)
# 1) Quick chart with Plotly Express
fig_scatter = px.scatter(
df,
x="x",
y="y",
color="group",
title="Scatter (px) + Graph Objects Updates",
template="plotly_white",
)
# 2) Use Graph Objects methods on a px figure
fig_scatter.update_traces(
hovertemplate="x=%{x}<br>y=%{y:.2f}<br>group=%{marker.color}<extra></extra>"
)
fig_scatter.add_hline(y=11, line_dash="dash", line_color="gray")
# 3) Build a small dashboard-like layout with subplots
fig = make_subplots(
rows=1,
cols=2,
subplot_titles=("Interactive Scatter", "Group Means (Bar)"),
specs=[[{"type": "scatter"}, {"type": "bar"}]],
)
# Left: reuse traces from the px figure
for tr in fig_scatter.data:
fig.add_trace(tr, row=1, col=1)
# Right: bar chart with group means
means = df.groupby("group", as_index=False)["y"].mean()
fig.add_trace(
go.Bar(x=means["group"], y=means["y"], name="mean(y)"),
row=1,
col=2,
)
fig.update_layout(
title="Plotly End-to-End Example",
height=450,
legend_title_text="Group",
margin=dict(l=40, r=20, t=70, b=40),
)
# Show interactively (notebook or supported environment)
fig.show()
# Export
fig.write_html("plotly_example.html", include_plotlyjs="cdn")
fig.write_image("plotly_example.png") # requires kaleido
if __name__ == "__main__":
main()
px vs goplotly.express (px) when:
plotly.graph_objects (go) when:
px.* returns a go.Figure, so fig.update_layout(...), fig.add_trace(...), fig.add_hline(...), etc. work seamlessly.hovertemplate to control text and numeric formatting.fig.update_xaxes(rangeslider_visible=True)write_html) preserves full interactivity.
include_plotlyjs="cdn" reduces file size but requires internet access to load Plotly JS.write_image) requires Kaleido and produces PNG/SVG/PDF suitable for reports.plotly_result.md unless the skill documentation defines a better convention.Run this minimal verification path before full execution when possible:
No local script validation step is required for this skill.
Expected output format:
Result file: plotly_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any
tools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.