언빌리버블티
[Python] koreanize_matplotlib : matplotlib 한국어 폰트 자동 설정 패키지 본문
Language/Python
[Python] koreanize_matplotlib : matplotlib 한국어 폰트 자동 설정 패키지
나는 정은 2022. 10. 5. 13:21koreanize-matplotlib란?
한글을 쓸 때 문제가 없도록 matplotlib의 폰트 설정을 자동으로 한국어로 지정해주는 라이브러리이다.
단순히 install & import 만으로도 matplotlib에서 한국어를 표시할 수 있는 굉장한 패키지이다.
(개발자 최고)
아래는 공식 Github
https://github.com/seongminp/koreanize-matplotlib
GitHub - seongminp/koreanize-matplotlib: install & import하는 것만으로 matplotlib에서 한국어를 표시할 수 있습
install & import하는 것만으로 matplotlib에서 한국어를 표시할 수 있습니다. - GitHub - seongminp/koreanize-matplotlib: install & import하는 것만으로 matplotlib에서 한국어를 표시할 수 있습니다.
github.com
사용 예시
# 한글폰트 사용을 위해 설치
!pip install koreanize-matplotlib
import koreanize_matplotlib
# 그래프에 retina display 적용
%config InlineBackend.figure_format = 'retina'
import matplotlib.pyplot as plt
import koreanize_matplotlib
plt.plot([-1, 0, 1, 2])
plt.xlabel('간단한 그래프')
plt.show()

Reference
https://libraries.io/pypi/koreanize-matplotlib
koreanize-matplotlib on Pypi
matplotlib의 폰트 설정을 자동으로 한국어화
libraries.io
'Language > Python' 카테고리의 다른 글
[Python] Pandas 데이터 프레임 병합 메서드 - pd.concat() (0) | 2022.10.07 |
---|---|
[Python] 수치형 변수의 구간화 - pd.cut() & pd.qcut() (0) | 2022.10.06 |
[Python] Conda Google API 라이브러리 설치 (0) | 2022.10.05 |
[Python] Pandas 그룹 함수 적용 메서드 (map, apply, applymap) (0) | 2022.10.05 |
[Python] requests module (HTTP 통신) (0) | 2022.09.29 |
Comments