[Matplotlib] colab에서 한글 폰트 출력

응엉·2023년 7월 21일
0

Matplotlib

목록 보기
1/2
post-thumbnail
  1. 아래 코드 실행
!sudo apt-get install -y fonts-nanum
!sudo fc-cache -fv
!rm ~/.cache/matplotlib -rf
  1. 런타임 다시 시작
  1. 아래 코드 실행
import matplotlib.pyplot as plt
  1. plt.figure 선언 후 하단에 해당 코드 추가
plt.rc('font', family='NanumBarunGothic')

ex)

plt.figure(figsize=(20,10))
plt.rc('font', family="NanumBarunGothic")

0개의 댓글