2.1.7.2.Distribution Plots
0. Distribution Plots的繪圖種類
sns.distplot (kde, bin)
sns.jointplot
sns.pairplot
sns.rugplot
1. 使用library
import seaborn as sns將圖表直接嵌入到Notebook之中
%matplotlib inline讀入資料
tips = sns.load_dataset('tips')
tips.head()
kde (Kernel distribution estimation)預設為true
也可以設為False

bin

比較資料來源中的兩個屬性之間的相關性或非相關性
繪圖前可以先設定背景的方格線
例如比較資料中帳單金額與小費間的關聯性

用顏色深淺來代表相關性 (顏色越深, 相關性越高)

線性回歸圖

kde (Kernel distribution estimation)

4.Pair plot
可以將資料來源中的數值欄位一一比較, 畫出關聯圖
輸入資料來源

加入類別欄位的比較
例如比較性別在資料上的差異

調整色系

以stick的方式表現資料

Last updated
Was this helpful?