seaborn
Skill này làm gì
Skill này dạy agent cách vẽ biểu đồ thống kê bằng thư viện seaborn trong Python. Skill dùng để khám phá dữ liệu nhanh, chẳng hạn xem giá trị phân bố thế nào hoặc hai biến liên hệ ra sao.
Khi nào nên dùng
- ✓Khi người dùng muốn xem giá trị phân bố giữa các nhóm bằng box plot hoặc violin plot.
- ✓Khi người dùng muốn khám phá quan hệ giữa nhiều biến bằng pair plot.
- ✓Khi người dùng có một bảng dữ liệu và muốn heatmap hoặc biểu đồ so sánh nhanh.
Liên kết skill
https://github.com/zLanqing/codex-claude-academic-skills/blob/main/scientific-toolkit-skill/references/scientific-skills/seaborn/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Vẽ box plot so sánh điểm kiểm tra của tôi giữa ba lớp trong bảng dữ liệu này.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent nạp dữ liệu vào bảng, chọn loại biểu đồ seaborn phù hợp, rồi vẽ với kiểu mặc định của seaborn. Matplotlib có thể dùng để chỉnh chi tiết hơn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Seaborn Statistical Visualization
Overview
Seaborn is a Python visualization library for creating publication-quality statistical graphics. Use this skill for dataset-oriented plotting, multivariate analysis, automatic statistical estimation, and complex multi-panel figures with minimal code.
Design Philosophy
Seaborn follows these core principles:
- Dataset-oriented: Work directly with DataFrames and named variables rather than abstract coordinates
- Semantic mapping: Automatically translate data values into visual properties (colors, sizes, styles)
- Statistical awareness: Built-in aggregation, error estimation, and confidence intervals
- Aesthetic defaults: Publication-ready themes and color palettes out of the box
- Matplotlib integration: Full compatibility with matplotlib customization when needed
Quick Start
import seaborn as sns
import matplotlib.pyplot as plt
import pandas as pd
# Load example dataset
df = sns.load_dataset('tips')
# Create a simple visualization
sns.scatterplot(data=df, x='total_bill', y='tip', hue='day')
plt.show()
Core Plotting Interfaces
Function Interface (Traditional)
The function interface provides specialized plotting functions organized by visualization type. Each category has axes-level functions (plot to single axes) and figure-level functions (manage entire figure with faceting).
When to use:
- Quick exploratory analysis
- Single-purpose visualizations
- When you need a specific plot type
Objects Interface (Modern)
The seaborn.objects interface provides a declarative, composable API similar to ggplot2. Build visualizations by chaining methods to specify data mappings, marks, transformations, and scales.
When to use:
- Complex layered visualizations
- When you need fine-grained control over transformations
- Building custom plot types
- Programmatic plot generation
from seaborn import objects as so
# Declarative syntax
(
so.Plot(data=df, x='total_bill', y='tip')
.add(so.Dot(), color='day')
.add(so.Line(), so.PolyFit())
)
Plotting Functions by Category
Relational Plots (Relationships Between Variables)
Use for: Exploring how two or more variables relate to each other
scatterplot()- Display individual observations as pointslineplot()- Show trends and changes (automatically aggregates and computes CI)relplot()- Figure-level interface with automatic faceting
Key parameters:
x,y- Primary variableshue- Color encoding for additional categorical/continuous variablesize- Point/line size encodingstyle- Marker/line style encodingcol,row- Facet into multiple subplots (figure-level only)
# Scatter with multiple semantic mappings
sns.scatterplot(data=df, x='total_bill', y='tip',
hue='time', size='size', style='sex')
# Line plot with confidence intervals
sns.lineplot(data=timeseries, x='date', y='value', hue='category')
# Faceted relational plot
sns.relplot(data=df, x='total_bill', y='tip',
col='time', row='sex', hue='smoker', kind='scatter')
Distribution Plots (Single and Bivariate Distributions)
Use for: Understanding data spread, shape, and probability density
histplot()- Bar-based frequency distributions with flexible binningkdeplot()- Smooth density estimates using Gaussian kernelsecdfplot()- Empirical cumulative distribution (no parameters to tune)rugplot()- Individual observation tick marksdisplot()- Figure-level interface for univariate and bivariate distributionsjointplot()- Bivariate plot with marginal distributionspairplot()- Matrix of pairwise relationships across dataset
Key parameters:
x,y- Variables (y optional for univariate)hue- Separate distributions by categorystat- Normalization: "count", "frequency", "probability", "density"bins/binwidth- Histogram binning controlbw_adjust- KDE bandwidth multiplier (higher = smoother)fill- Fill area under curvemultiple- How to handle hue: "layer", "stack", "dodge", "fill"
# Histogram with density normalization
sns.histplot(data=df, x='total_bill', hue='time',
stat='density', multiple='stack')
# Bivariate KDE with contours
sns.kdeplot(data=df, x='total_bill', y='tip',
fill=True, levels=5, thresh=0.1)
# Joint plot with marginals
sns.jointplot(data=df, x='total_bill', y
Câu hỏi thường gặp
Nó có tự tính thống kê không?
Có. Skill nói seaborn có sẵn tổng hợp và khoảng tin cậy.
Khi nào nên dùng công cụ khác?
Skill nói nên dùng plotly cho biểu đồ tương tác, và skill trực quan hóa khoa học cho định dạng công bố.
Nó có xây dựng trên matplotlib không?
Có. Skill nói seaborn được xây dựng trên matplotlib và hoạt động cùng khả năng tùy chỉnh của nó.
Chi tiết
Mô tả gốc của tác giả
Statistical visualization with pandas integration. Use for quick exploration of distributions, relationships, and categorical comparisons with attractive defaults. Best for box plots, violin plots, pair plots, heatmaps. Built on matplotlib. For interactive plots use plotly; for publication styling use scientific-visualization.
Độ phổ biến
- Sao GitHub
- 5.6k
- Vị trí xếp hạng
- #14772
- Giấy phép
- MIT
- Cập nhật
- 14/5/2026
Bình luận
- …
Thêm skill từ kho mã này
office-academic-skill
5.6kGiúp agent của bạn biến bài báo khoa học thành báo cáo Word và tạo slide PowerPoint học thuật có thể chỉnh sửa, ưu tiên tiếng Trung, kèm ghi chú người trình bày và kiểm tra bố cục.
research-writing-skill
5.6kGiúp agent của bạn viết, sửa và trau chuốt các phần của bài báo khoa học, tóm tắt và phản hồi cho phản biện, giữ nguyên công thức, tiêu đề và trích dẫn.
scientific-toolkit-skill
5.6kGiúp agent của bạn viết và gỡ lỗi mã khoa học MATLAB hoặc Python cho xử lý tín hiệu và ảnh, thống kê, mô phỏng và biểu đồ sẵn sàng cho công bố.
matlab
5.6kGiúp agent của bạn viết và gỡ lỗi script MATLAB và GNU Octave cho phép toán ma trận, xử lý tín hiệu và ảnh, phương trình vi phân, tối ưu hóa và biểu đồ.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.