[파이썬] matplot 한글 깨짐

김세훈·2023년 6월 5일

파이썬

목록 보기
1/1

파이썬에서 matplot 사용 시 한글 깨짐 현상이 나타나는데 아래의 코드로 해결 가능

import matplotlib.pyplot as plt
from matplotlib import rc, font_manager

# 폰트 경로는 자신에 맞게 수정 필요
font_path = "../../ds_study/malgun.ttf"
font = font_manager.FontProperties(fname=font_path).get_name()
rc('font', family=font)

profile
KimSe's 주절주절

0개의 댓글