우분투에서 matplotlib 한글 설정 방법

개발하는 G0·2023년 7월 16일
0

nanumgothic 폰트를 다운받아 설치한 다음

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

fe = fm.FontEntry(
    fname=r'/usr/share/fonts/truetype/nanum/NanumGothic.ttf',
    name='nanumgothic')
fm.fontManager.ttflist.insert(0, fe)
plt.rcParams["font.family"] = "nanumgothic"
profile
초보 개발자

0개의 댓글