SKILL.md
Interactive Visualization Guide
Create interactive, publication-ready visualizations using Plotly, ECharts, Altair, and Bokeh for academic papers, presentations, and supplementary materials.
When to Use Interactive Visualizations
| Scenario | Static | Interactive |
|---|---|---|
| Journal PDF figure | Preferred | Not supported |
| Supplementary materials | Optional | Excellent |
| Conference poster (digital) | Common | Increasingly popular |
| Presentation slides | Standard | Engaging |
| Online appendix / project website | Limited | Ideal |
| Exploratory data analysis | Quick | Detailed exploration |
Plotly (Python)
Plotly produces interactive HTML charts with hover tooltips, zoom, pan, and export capabilities.
Scatter Plot with Hover Details
import plotly.express as px
import pandas as pd
# Example: visualize paper citations vs. year
df = pd.DataFrame({
"title": ["Paper A", "Paper B", "Paper C", "Paper D", "Paper E"],
"year": [2019, 2020, 2021, 2022, 2023],
"citations": [150, 320, 89, 450, 210],
"field": ["NLP", "CV", "NLP", "RL", "CV"],
"venue": ["ACL", "CVPR", "EMNLP", "NeurIPS", "ICCV"]
})
fig = px.scatter(
df, x="year", y="citations",
color="field", size="citations",
hover_data=["title", "venue"],
title="Citation Counts by Year and Field",
labels={"citations": "Citation Count", "year": "Publication Year"}
)
fig.update_layout(
template="plotly_white",
font=dict(size=14),
width=800, height=500
)
fig.write_html("citations_interactive.html")
fig.show()
Grouped Bar Chart
import plotly.graph_objects as go
methods = ["Baseline", "Method A", "Method B", "Ours"]
accuracy = [82.1, 85.3, 87.0, 89.4]
f1_score = [79.8, 83.1, 85.2, 87.9]
fig = go.Figure(data=[
go.Bar(name="Accuracy", x=methods, y=accuracy,
text=[f"{v}%" for v in accuracy], textposition="auto"),
go.Bar(name="F1 Score", x=methods, y=f1_score,
text=[f"{v}%" for v in f1_score], textposition="auto")
])
fig.update_layout(
barmode="group",
title="Model Performance Comparison",
yaxis_title="Score (%)",
yaxis_range=[70, 95],
template="plotly_white"
)
fig.write_html("comparison.html")
