본문 바로가기

Basic/[Python] Etc.

Jupyter Notebook - matplotlib 한글 폰트 깨짐 방지

%config InlineBackend.figure_format = 'retina'

import matplotlib.pyplot as plt
import matplotlib.font_manager as fm

fontpath = '/usr/share/fonts/truetype/nanum/NanumBarunGothic.ttf'
font = fm.FontProperties(fname=fontpath, size=9)
plt.rc('font', family='NanumBarunGothic')

 

'Basic > [Python] Etc.' 카테고리의 다른 글

[Google Colab] 내 구글 드라이브 mount하기  (0) 2023.03.16
Jupyter Notebook - 가상 환경 설치  (0) 2023.03.13