建立可發表等級的統計視覺化需要大量樣板程式碼與設計決策。本技能提供對 seaborn 函式庫的最佳化存取,可產生箱型圖、小提琴圖、熱圖與配對圖,並具備美觀的預設值與 pandas 整合。
下載技能 ZIP
在 Claude 中上傳
前往 設定 → 功能 → 技能 → 上傳技能
開啟並開始使用
測試它
正在使用「seaborn」。 Create a box plot showing revenue by region using the sales_data DataFrame. Set region as x-axis and revenue as y-axis.
預期結果:
具有箱型圖的圖表,x 軸為地區,y 軸為收入,顯示各地區的中位數、四分位數與離群值。套用 seaborn 預設樣式的整潔呈現。
正在使用「seaborn」。 Generate a heatmap of the correlation matrix from customer_data with annotations showing the correlation coefficients.
預期結果:
方形熱圖,依相關強度上色(紅藍分歧調色盤),每個格子有數值標註,並包含顯示尺度的色條圖例。
正在使用「seaborn」。 Create a violin plot of response times by priority level from support_data, with box inside showing quartiles.
預期結果:
小提琴圖,x 軸為優先等級,y 軸為回應時間。每個小提琴顯示完整分佈,並疊加箱型圖顯示中位數與四分位線。
安全審計
安全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.
品質評分
你能建構什麼
探索資料集分佈以進行分析
使用箱型圖與小提琴圖快速比較分類群組間的分佈,以找出實驗或問卷資料中的離群值與模式。
在筆記本中視覺化相關矩陣
建立標註式熱圖,顯示變數間的相關係數,以支援機器學習工作流程中的特徵選擇與多重共線性評估。
產生可發表等級的圖表
透過 seaborn 主題自訂,產生具有一致美感的統計圖表,用於學術論文、報告與簡報。
試試這些提示
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.
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.
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.
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.
最佳實務
- 在建立多個相關視覺化(用於報告)時,使用一致的圖形大小(透過 matplotlib 圖形參數設定)
- 在工作階段開始時套用 seaborn 主題設定(sns.set_theme),確保所有圖形樣式一致
- 選擇合適的色盤(相關性用分歧色盤、幅度用連續色盤),以準確呈現資料關係
避免
- 避免建立類別過多的過度複雜視覺化(可先彙總或篩選資料)
- 樣本數過小時不要使用箱型圖,此時小提琴圖或散點條帶圖更能呈現分佈
- 避免過多註解造成視覺負擔;保持標籤與標題清楚精簡