Matplotplib 한글 적용

GisangLee·2022년 7월 30일
0

my_module

목록 보기
25/33
!apt-get update -qq
!apt-get install fonts-nanum* -qq

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

path = '/usr/share/fonts/truetype/nanum/NanumGothicEco.ttf'
font_name = fm.FontProperties(fname=path, size=10).get_name()

plt.rc('font', family=font_name)

fm._rebuild()
from matplotlib import pyplot as plt
plt.rc('font', family='NanumBarunGothic') 
profile
포폴 및 이력서 : https://gisanglee.github.io/web-porfolio/

0개의 댓글