IT/Python Matlab

Matplotlib 그래프에서 한글 타이틀, legend, label 등이 안깨지게...

smores 2025. 10. 24. 12:53

윈도우즈 기준으로

시작할 때 아래 두번째부터 세줄 추가로 간단히 해결

 

import matplotlib.pyplot as plt

from matplotlib import font_manager, rc
plt.rcParams['font.family'] = 'Malgun Gothic'
plt.rcParams['axes.unicode_minus'] = False  # 마이너스 기호 깨짐 방지