Python/Streamlit

Streamlit) 대시보드의 그래프에 한글 나오게 하는 코드

567Rabbit 2024. 5. 3. 09:59

 

https://luvris2.tistory.com/119

 

AWS EC2 - Streamlit 대시보드에 한글 출력하기 (한글 깨짐)

이 글은 리눅스 한글 폰트가 설치되어있다는 가정하에 진행합니다. 아래의 포스팅으로 이동하면 한글 폰트를 설치하는 절차가 기재되어있습니다. https://luvris2.tistory.com/118 리눅스 - 한글 폰트 설

luvris2.tistory.com

설치는 위 블로그를 참조한다

 

# 그래프에 한글 나오게 하는 코드
import platform
import matplotlib.pyplot as plt
from matplotlib import font_manager, rc
plt.rcParams['axes.unicode_minus'] = False
if platform.system() == 'Linux':
    rc('font', family='NanumGothic')