
Seaborn
Install this when you need copy-ready Seaborn patterns for EDA, correlation heatmaps, and publication figures in a Python data or research workflow.
Overview
Seaborn is an agent skill for the Build phase that provides common Seaborn and matplotlib visualization examples for EDA, correlation analysis, and publication figures.
Install
npx skills add https://github.com/k-dense-ai/scientific-agent-skills --skill seabornWhat is this skill?
- Exploratory workflows: pairplot with hue and corner mode, faceted KDE displot, and masked correlation heatmaps
- Publication-oriented styling with tight layout and high-DPI figure export patterns
- Pandas-friendly APIs for numeric correlation matrices and categorical hue/col faceting
- Practical imports for seaborn, matplotlib, pandas, and numpy in scientific plots
- Multi-panel and displot/col_wrap layouts for timepoint or condition comparisons
- Example exports use dpi=300 for publication saves
- Correlation workflow uses upper-triangle mask on numeric correlation matrix
Adoption & trust: 602 installs on skills.sh; 27.6k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need correct Seaborn plot code for EDA or papers fast, but faceting, masks, and style defaults are easy to get wrong under time pressure.
Who is it for?
Indie data scientists and builders shipping Python analytics, research appendices, or internal metric notebooks who want agent help with standard Seaborn patterns.
Skip if: Pure JavaScript charting stacks, production BI tools with no Python code, or deep custom matplotlib artists where Seaborn wrappers are bypassed entirely.
When should I use this skill?
Tasks involving Seaborn statistical plots, EDA visualizations, correlation heatmaps, or publication figure layout in Python.
What do I get? / Deliverables
You obtain working Seaborn examples—pairplots, displots, heatmaps, and publication layouts—you can paste into notebooks or data pipelines and adjust for your dataset.
- Notebook-ready Seaborn scripts for pairplot, displot, and heatmap workflows
- Publication-oriented figure files from provided savefig patterns
Recommended Skills
Journey fit
Seaborn recipes support building analytics, research outputs, and data-backed product features during Build; backend subphase fits Python data code paths rather than marketing or ops monitoring. Backend subphase is the shelf for Python data manipulation and visualization code that feeds apps, reports, and ML pipelines—not launch SEO or operate alerting.
How it compares
Example cookbook skill for Seaborn plots, not a hosted visualization MCP or automated ML training pipeline.
Common Questions / FAQ
Who is seaborn for?
It is for solo builders and researchers using Python pandas workflows who want agent-assisted Seaborn code for exploration and publication-quality figures.
When should I use seaborn?
Use it during Build while writing notebook or backend analytics code for EDA pairplots, correlation matrices, or multi-panel scientific figures.
Is seaborn safe to install?
It describes plotting code patterns only; check the Security Audits panel on this Prism page for the ingested package before you add it to an agent.
SKILL.md
READMESKILL.md - Seaborn
# Seaborn Common Use Cases and Examples This document provides practical examples for common data visualization scenarios using seaborn. ## Exploratory Data Analysis ### Quick Dataset Overview ```python import seaborn as sns import matplotlib.pyplot as plt import pandas as pd # Load data df = pd.read_csv('data.csv') # Pairwise relationships for all numeric variables sns.pairplot(df, hue='target_variable', corner=True, diag_kind='kde') plt.suptitle('Dataset Overview', y=1.01) plt.savefig('overview.png', dpi=300, bbox_inches='tight') ``` ### Distribution Exploration ```python # Multiple distributions across categories g = sns.displot( data=df, x='measurement', hue='condition', col='timepoint', kind='kde', fill=True, height=3, aspect=1.5, col_wrap=3, common_norm=False ) g.set_axis_labels('Measurement Value', 'Density') g.set_titles('{col_name}') ``` ### Correlation Analysis ```python # Compute correlation matrix corr = df.select_dtypes(include='number').corr() # Create mask for upper triangle mask = np.triu(np.ones_like(corr, dtype=bool)) # Plot heatmap fig, ax = plt.subplots(figsize=(10, 8)) sns.heatmap( corr, mask=mask, annot=True, fmt='.2f', cmap='coolwarm', center=0, square=True, linewidths=1, cbar_kws={'shrink': 0.8} ) plt.title('Correlation Matrix') plt.tight_layout() ``` ## Scientific Publications ### Multi-Panel Figure with Different Plot Types ```python # Set publication style sns.set_theme(style='ticks', context='paper', font_scale=1.1) sns.set_palette('colorblind') # Create figure with custom layout fig = plt.figure(figsize=(12, 8)) gs = fig.add_gridspec(2, 3, hspace=0.3, wspace=0.3) # Panel A: Time series ax1 = fig.add_subplot(gs[0, :2]) sns.lineplot( data=timeseries_df, x='time', y='expression', hue='gene', style='treatment', markers=True, dashes=False, ax=ax1 ) ax1.set_title('A. Gene Expression Over Time', loc='left', fontweight='bold') ax1.set_xlabel('Time (hours)') ax1.set_ylabel('Expression Level (AU)') # Panel B: Distribution comparison ax2 = fig.add_subplot(gs[0, 2]) sns.violinplot( data=expression_df, x='treatment', y='expression', inner='box', ax=ax2 ) ax2.set_title('B. Expression Distribution', loc='left', fontweight='bold') ax2.set_xlabel('Treatment') ax2.set_ylabel('') # Panel C: Correlation ax3 = fig.add_subplot(gs[1, 0]) sns.scatterplot( data=correlation_df, x='gene1', y='gene2', hue='cell_type', alpha=0.6, ax=ax3 ) sns.regplot( data=correlation_df, x='gene1', y='gene2', scatter=False, color='black', ax=ax3 ) ax3.set_title('C. Gene Correlation', loc='left', fontweight='bold') ax3.set_xlabel('Gene 1 Expression') ax3.set_ylabel('Gene 2 Expression') # Panel D: Heatmap ax4 = fig.add_subplot(gs[1, 1:]) sns.heatmap( sample_matrix, cmap='RdBu_r', center=0, annot=True, fmt='.1f', cbar_kws={'label': 'Log2 Fold Change'}, ax=ax4 ) ax4.set_title('D. Treatment Effects', loc='left', fontweight='bold') ax4.set_xlabel('Sample') ax4.set_ylabel('Gene') # Clean up sns.despine() plt.savefig('figure.pdf', dpi=300, bbox_inches='tight') plt.savefig('figure.png', dpi=300, bbox_inches='tight') ``` ### Box Plot with Significance Annotations ```python import numpy as np from scipy import stats # Create plot fig, ax = plt.subplots(figsize=(8, 6)) sns.boxplot( data=df, x='treatment', y='response', order=['Control', 'Low', 'Medium', 'High'], palette='Set2', ax=ax ) # Add individual points sns.stripplot( data=df, x='treatment', y='response', order=['Control', 'Low', 'Medium', 'High'], color='black', alpha=0.3, size=3, ax=ax ) # Add significance bars def add_significance_bar(ax, x1, x2, y, h, text): ax.plot([x1, x1, x2, x2], [y, y+h, y+h, y], 'k-', lw=1.5) ax.text((x1+x2)/2, y+h, text, ha='center', va='bottom') y_max = df['response'].max() add_si