Statistical visualization library integrated with pandas; use it when you need fast EDA of distributions, relationships, and categorical comparisons (e.g., box/violin/pair plots and heatmaps) with strong default aesthetics on top of matplotlib.
62
74%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./scientific-skills/Data Analysis/seaborn/SKILL.mdhue, size, style).row/col using figure-level APIs).hue, size, style, and faceting (row, col).Axes, accept ax=) for custom layouts.seaborn>=0.13matplotlib>=3.7pandas>=2.0numpy>=1.24import seaborn as sns
import matplotlib.pyplot as plt
def main():
# Built-in example dataset (requires internet on first use in some environments)
df = sns.load_dataset("tips")
sns.set_theme(style="whitegrid", palette="colorblind")
# 1) Relationship exploration with semantic mapping
ax = sns.scatterplot(
data=df,
x="total_bill",
y="tip",
hue="day",
style="sex",
size="size",
sizes=(30, 200),
alpha=0.8,
)
ax.set(title="Tips: Total Bill vs Tip", xlabel="Total bill ($)", ylabel="Tip ($)")
plt.tight_layout()
plt.show()
# 2) Faceted categorical comparison (figure-level)
g = sns.catplot(
data=df,
x="day",
y="total_bill",
col="time",
kind="violin",
inner="quartile",
height=3.5,
aspect=1.1,
)
g.set_axis_labels("Day", "Total bill ($)")
g.set_titles("{col_name}")
plt.tight_layout()
plt.show()
# 3) Correlation heatmap (matrix plot)
corr = df.select_dtypes("number").corr(numeric_only=True)
plt.figure(figsize=(5.5, 4.5))
sns.heatmap(corr, annot=True, fmt=".2f", cmap="coolwarm", center=0, square=True)
plt.title("Numeric Correlations (tips)")
plt.tight_layout()
plt.show()
if __name__ == "__main__":
main()Axes-level vs Figure-level
scatterplot, histplot, boxplot, regplot, heatmap) draw onto one matplotlib Axes, accept ax=, and are best for custom subplot grids.relplot, displot, catplot, lmplot, jointplot, pairplot) manage the full figure and faceting; they return Grid objects (e.g., FacetGrid, JointGrid, PairGrid) and are not designed to be embedded into an existing matplotlib figure.Data shape expectations
pandas.melt() for general-purpose plotting.Statistical estimation controls
lineplot aggregates and can display uncertainty bands; barplot estimates a central tendency with error bars).estimator=, errorbar= (or legacy ci=), and for KDE smoothing bw_adjust=.Distribution and smoothing parameters
bins= / binwidth=, stat= ("count", "frequency", "probability", "density"), and multiple= for hue handling ("layer", "stack", "dodge", "fill").bw_adjust (higher = smoother), fill=True, levels= for contour density plots.Color and theme system
center= in heatmaps).sns.set_theme(style=..., context=..., palette=...); use matplotlib calls for final layout (plt.tight_layout()) and export (savefig(dpi=300, bbox_inches="tight")).seaborn_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: seaborn_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if anyf5ef65b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.