노트/Python : 프로그래밍
[python] Colab에서 한글 폰트 사용하기
Diane_
2022. 11. 1. 09:14
아래 코드를 실행하고, 런타임 -> 런타임 다시 시작 실행
!pip install matplotlib -U
!sudo apt-get install -y fonts-nanum
!sudo fc-cache -fv
!rm ~/.cache/matplotlib -rf
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = ['NanumGothic', 'sans-serif']
plt.rcParams['axes.unicode_minus'] = False
x = [1,2,3]
plt.plot(x)
plt.title('차트명')
차트명 글자 나오는지 확인