Skills seaborn
📦

seaborn

Safe

Create Statistical Visualizations with Seaborn

Also available from: davila7

Creating publication-quality statistical visualizations requires significant boilerplate code and design decisions. This skill provides optimized access to seaborn library functions for generating box plots, violin plots, heatmaps, and pair plots with attractive defaults and pandas integration.

Supports: Claude Codex Code(CC)
📊 71 Adequate
1

Download the skill ZIP

2

Upload in Claude

Go to Settings → Capabilities → Skills → Upload skill

3

Toggle on and start using

Test it

Using "seaborn". Create a box plot showing revenue by region using the sales_data DataFrame. Set region as x-axis and revenue as y-axis.

Expected outcome:

A box plot figure with regions on the x-axis, revenue on the y-axis, showing median, quartiles, and outliers for each region. Clean styling with seaborn defaults applied.

Using "seaborn". Generate a heatmap of the correlation matrix from customer_data with annotations showing the correlation coefficients.

Expected outcome:

A square heatmap with cells colored by correlation strength (red-blue diverging palette), numeric annotations in each cell, and a colorbar legend showing the scale.

Using "seaborn". Create a violin plot of response times by priority level from support_data, with box inside showing quartiles.

Expected outcome:

A violin plot with priority levels on x-axis and response times on y-axis. Each violin shows the full distribution, with a box plot overlay displaying median and quartile lines.

Security Audit

Safe
v5 • 1/21/2026

All static findings are false positives. The scanner incorrectly identified markdown documentation formatting (backticks for inline code) as shell command execution, library names as cryptographic algorithms, and standard metadata as network indicators. This is a legitimate statistical visualization skill with no malicious code or risky operations.

6
Files scanned
13,991
Lines analyzed
0
findings
5
Total audits
No security issues found
Audited by: claude View Audit History →

Quality Score

45
Architecture
100
Maintainability
87
Content
19
Community
100
Security
87
Spec Compliance

What You Can Build

Explore Dataset Distributions for Analysis

Quickly generate distribution comparisons across categorical groups using box plots and violin plots to identify outliers and patterns in experimental or survey data.

Visualize Correlation Matrices in Notebooks

Create annotated heatmaps showing correlation coefficients between variables to support feature selection and multicollinearity assessment in machine learning workflows.

Generate Publication-Quality Figures

Produce styled statistical figures with consistent aesthetics for academic papers, reports, and presentations using seaborn theme customization.

Try These Prompts

Basic Box Plot
Use the seaborn skill to create a box plot comparing values across a categorical variable. Use the sample_data DataFrame with 'category' as the x-axis and 'value' as the y-axis. Apply the seaborn default theme and add appropriate labels.
Styled Violin Plot
Generate a violin plot with the seaborn skill showing the distribution of 'scores' by 'treatment_group' from experiment_data. Include the inner='box' option to show quartiles. Use a professional color palette and set figure size to 10x6.
Correlation Heatmap
Create a heatmap using seaborn to visualize the correlation matrix from features_df. Annotate cells with correlation values, use a diverging colormap centered at 0, and include a colorbar legend. Set the figure size appropriately for readability.
Multi-Variable Pair Plot
Generate a pair plot using seaborn for the columns ['sepal_length', 'sepal_width', 'petal_length', 'petal_width'] from iris_data. Color points by species, show scatter plots on lower triangle and distributions on diagonal, and use a subplot grid size of 12x12.

Best Practices

  • Use consistent figure sizes (set via matplotlib figure parameters) when creating multiple related visualizations for reports
  • Apply seaborn theme settings (sns.set_theme) once at the beginning of sessions for consistent styling across all generated figures
  • Choose appropriate color palettes (diverging for correlations, sequential for magnitudes) to accurately represent data relationships

Avoid

  • Avoid creating overly complex visualizations with too many categories (consider aggregating or filtering data first)
  • Do not use box plots for very small sample sizes where violin or strip plots would show the distribution better
  • Avoid overwhelming figures with excessive annotations; keep labels and titles clear and concise

Frequently Asked Questions

What is the difference between box plots and violin plots in seaborn?
Box plots show summary statistics (median, quartiles, outliers) as a box with whiskers. Violin plots show the full distribution shape using kernel density estimation, making them better for understanding data distribution beyond summary statistics.
Can I use seaborn with data stored in pandas DataFrames?
Yes, seaborn is designed for pandas integration. Pass the DataFrame to functions along with column names for x, y, and hue parameters. Seaborn automatically handles data access from the DataFrame.
How do I save seaborn figures for publication?
Use matplotlib's savefig function after creating your seaborn plot. Set dpi=300 for high resolution, specify the format (PNG, PDF, SVG) in the filename, and adjust figure size before saving.
What color palettes are available in seaborn?
Seaborn provides named palettes like 'deep', 'muted', 'pastel', 'bright', 'dark', and 'colorblind'. You can also create custom palettes using sns.color_palette() with specific colors or using built-in palettes like 'husl' or 'cubehelix'.
How do I customize seaborn figure styling globally?
Use sns.set_theme() or sns.set_style(), sns.set_context(), and sns.set_palette() to control the theme, plotting context (paper, talk, poster), and color palette across all figures in your session.
Can I combine matplotlib and seaborn in the same figure?
Yes, seaborn returns matplotlib axes objects that can be customized with matplotlib functions. You can add annotations, modify axis limits, or layer additional plots using standard matplotlib commands on seaborn-generated axes.