seaborn

그래프 그리기 ax = plt.subplots() ax = tips['total_bill'].plot.hist() 우선 시리즈에 있는 plot 속성에 정의된 hist 메서드를 사용하여 히스토그램을 그릴 수 있다. 투명도를 조절하려면 hist 메서드의 alpha, bins, ax 인자를 사용하면 된다. fig, ax = plt.subplots() ax = tips[['total_bill', 'tip']].plot.hist(alpha=0.5, bins=20, ax=ax) 밀집도, 산점도 그래프, 육각 그래프는 각각 kde, scatter, hexbin 메서드를 사용하면 된다. fig, ax = plt.subplots() ax = tips['tip'].plot.kde() fig, ax = plt.subplot..
단변량 그래프 그리기 - 히스토그램 seaborn 라이브러리를 sns라고 하자. import seaborn as sns tips = sns.load_dataset("tips") ax = plt.subplots() ax = sns.distplot(tips['total_bill']) ax.set_title('Total Bill Histogram with Density Plot') subplots 메서드로 기본 틀을 만들고 distplot 메서드에 total_bill 열 데이터를 전달하여 히스토그램을 그릴 수 있다. 이때 distplot 메서드를 사용하면 히스토그램과 밀집도 그래프를 같이 그린다. 만약 밀집도 그래프를 제외하고 싶다면 kde 인잣값을 False로 설정하면 된다. 밀집도 그래프만 나타내고 싶다면..