본문 바로가기
Project

[data analysis] pycharm matplotlib 한글 깨질때 문제 해결 방법

by boooluve2 2024. 4. 17.
반응형
import matplotlib.pyplot as plt
sns.heatmap(data=df.corr(), annot=True,
            fmt='.2f', linewidths=.5, cmap='GnBu')

 

matplotlib heatmap 시각화 진행중 figure한글이 깨져 아래와 같이 산출물이 나옴

해결방법 : 

 

plt.rcParams['font.family'] ='Malgun Gothic'
plt.rcParams['axes.unicode_minus'] =False

 

기본 windows font인 malgun gothic 추가 후 성공 !

 

반응형