Skillpedia
تعلّم الآلة51k · #3572

seaborn

ما الذي تفعله

Seaborn أداة تنشئ مخططات جميلة ومفيدة من بياناتك. تساعدك على فهم الأنماط والعلاقات والتوزيعات داخل الأرقام.

متى تستخدمها

  • ✓عندما تملك بيانات في صورة جدول وتريد تمثيلها بصرياً.
  • ✓عندما تريد مقارنة المجموعات أو معرفة كيف ترتبط المتغيرات ببعضها.
  • ✓عندما تُعد تقارير أو عروضاً تحتاج إلى رسوم بيانية واضحة.

رابط المهارة

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/seaborn/SKILL.md

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/seaborn/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“أنشئ مخطط تشتت يُظهر العلاقة بين إجمالي الفاتورة والبقشيش، مع تلوين النقاط حسب يوم الأسبوع، باستخدام مجموعة البيانات «tips».”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

تزوّد البيانات (عادةً في صيغة جدول) وتحدد الأعمدة التي تُستخدم للمحاور والألوان. يتولى Seaborn رسم المخطط نيابةً عنك.

المحتوى التقني (ملف SKILL.md الأصلي)

النص الأصلي من المؤلف، مباشرة من GitHub.

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.

Environment and Installation

Reviewed 2026-10-01 against the current stable Seaborn 0.13.2 documentation and released source. Native synthetic checks used Python 3.13, Seaborn 0.13.2, Matplotlib 3.11.2, pandas 3.0.6, NumPy 2.5.3, SciPy 1.18.1, and statsmodels 0.15.0. Official docs support Python 3.8+ with mandatory NumPy, pandas, and matplotlib dependencies; scipy, statsmodels, and fastcluster are optional for some advanced statistics and clustering workflows. The tested stack emits upstream pandas Copy-on-Write and Matplotlib deprecation warnings; successful current plots do not guarantee compatibility with future pandas 4 or Matplotlib 3.13.

# Reproducible install for examples in this skill
uv pip install "seaborn==0.13.2"

# Include optional statistical dependencies when needed
uv pip install "seaborn[stats]==0.13.2"

Recommended imports:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import seaborn.objects as so

sns.load_dataset() downloads public CSV example data from the moving mwaskom/seaborn-data repository when it is not cached; it returns a DataFrame and applies some dataset-specific preprocessing. No credentials are required. Cache presence does not establish dataset version: record the source revision or file hash for reproducibility. For private, regulated, or offline work, load local files explicitly with pandas and pass the resulting DataFrame to seaborn.

Design Philosophy

Seaborn follows these core principles:

  1. Dataset-oriented: Work directly with DataFrames and named variables rather than abstract coordinates
  2. Semantic mapping: Automatically translate data values into visual properties (colors, sizes, styles)
  3. Statistical awareness: Built-in aggregation, error estimation, and confidence intervals
  4. Aesthetic defaults: Publication-ready themes and color palettes out of the box
  5. Matplotlib integration: Matplotlib axes and artists support further customization

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. Upstream still describes this interface as experimental and incomplete in 0.13.2, although stable enough for serious use; prefer the function interface for conservative production code unless the compositional API materially simplifies the plot.

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(order=1))
)

Current API Notes

Seaborn 0.12 and 0.13 changed several common plotting patterns:

  • Most plotting functions now require keyword arguments for variables. Prefer sns.scatterplot(data=df, x="x", y="y") over positional sns.scatterplot(df["x"], df["y"]).
  • errorbar replaces the old ci parameter in lineplot(), barplot(), and pointplot(). Regression functions such as regplot() and lmplot() still use ci.
  • Categorical plots were rewritten in 0.13. Use native_scale=True when numeric or datetime categories should keep their original scale instead of ordinal positions.

…

الأسئلة الشائعة

هل أحتاج إلى تثبيت أي شيء؟

نعم، تحتاج إلى تثبيت Python ثم تثبيت مكتبة Seaborn باستخدام أمر مثل «pip install seaborn».

ما نوع البيانات التي يستخدمها Seaborn؟

يعمل بأفضل شكل مع البيانات المنظمة في صيغة «جدول»، حيث يمثل كل صف ملاحظة، ويمثل كل عمود متغيراً. وتُسمى هذه الصيغة «البيانات الطويلة» (long-form data).

هل يمكنني استخدام ملفات بياناتي الخاصة؟

نعم، يمكنك تحميل بياناتك من الملفات (مثل CSV) باستخدام مكتبة Pandas، ثم تمريرها إلى Seaborn لإنشاء المخططات.

التفاصيل

الوصف الأصلي من المؤلف

Creates Seaborn statistical visualizations with pandas integration for distributions, relationships, categorical comparisons, regression displays, pair plots, and heatmaps. Supports function and objects interfaces with explicit aggregation, uncertainty, and missing-data handling. Best suited to static exploratory plots; plotly covers interactive figures and scientific-visualization covers publicat

repo: K-Dense-AI/scientific-agent-skills

الشعبية

نجوم GitHub
51k
الترتيب
#3572
الترخيص
MIT
آخر تحديث
15‏/10‏/2026

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة