import numpy as np
import pandas as pd
import seaborn as sns
catplot은 category별 분포를 나타내준다.
따라서, x축 변수는 categorical var이 들어가야한다.
sns.catplot(pd_pen, x='species', y ='bill_length_mm')
sns.catplot(pd_pen, x='species', y ='bill_length_mm', jiter=0.25)
sns.catplot(pd_pen, x='species', y ='bill_length_mm', jiter=0.25, hue= 'sex')
.
.
kind = 'swarm'
sns.catplot(pd_pen, x='species', y ='bill_length_mm', kind = 'swarm')
sns.catplot(pd_pen, x='species', y ='bill_length_mm', kind = 'swarm', hue = 'sex')
.
.
kind = 'violin'
: 각 category별 kde 곡선 + boxplot
sns.catplot(pd_pen, x='species', y ='bill_length_mm',kind = 'violin')
# 좌우대칭임.
sns.catplot(pd_pen, x='species', y ='bill_length_mm',kind = 'violin', hue='sex')
.
.
.
.
kind = 'boxen'
: boxplot + 분포
sns.catplot(pd_pen, x='species', y ='bill_length_mm', kind = 'boxen')
sns.catplot(pd_pen, x='species', y ='bill_length_mm', kind = 'boxen', hue = 'sex')