DataAnalysis
[Python] seaborn plot 크기 조정하기
메린지
2023. 2. 2. 16:38
1. Library
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(rc={'figure.figsize':(15, 5)}) # figure size 미리 조정
import pandas as pd
2. Plot
2-1. distplot
이제 없어질 친구라고 경고 알림이 뜨고 세팅한 대로 사이즈가 안나오는 듯 하다
2-2. hisplot
이 친구는 잘나온다
2-3. displot
자기 마음대로 출력된다
이는 Figure-leve(displot), axes-level(histplot) 함수 간의 차이로 인해서 그럼
displot은 아래 옵션으로 조절가능
sns.displot(df['sepal_length'], height=5, aspect=3)
# aspect = width / hegiht