Python
Python pyplot, matplotlib, plt 에서 한글 깨짐 문제 해결법
koos808
2020. 11. 16. 18:50
728x90
반응형
-
pyplot, matplotlib, plt 에서 한글 깨짐 문제 해결법
-
-
다음과 같이 폰트 path를 지정하고 옵션으로 넣어주면 된다.
import matplotlib.pyplot as plt import matplotlib.font_manager as fm path = 'NanumBarunGothic.ttf' fontprop = fm.FontProperties(fname = path, size = 18) plt.ylabel('세로축', fontproperties = fontprop) plt.title('가로축', fontproperties = fontprop) plt.show()
-
728x90
반응형