Notice
Recent Posts
Recent Comments
05-06 07:24
Archives
관리 메뉴

develop myself

matplotlib basic tips 본문

DataScience/Python

matplotlib basic tips

insightous 2023. 1. 26. 17:08

폰트 설정

import matplotlib.font_manager as fm

# 설치된 폰트 출력
font_list = [ font.name  for font in fm.fontManager.ttflist if font.name.startswith('Nanum')]
font_list
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'NanumGothic'
plt.rcParams['font.family'] = 'Malgun Gothic'

이미지 저장

plt.savefig("filename")

이미지 output

%matplotlib inline
plt.show()

minus error

plt.rcParams['axes.unicode_minus'] = False

 

 

'DataScience > Python' 카테고리의 다른 글

데이터 핸들링: 기본  (0) 2023.01.27
matplotlib cheatsheets, handout  (0) 2023.01.26
pandas basic tips  (0) 2023.01.26
numpy basic tips  (0) 2023.01.26
Python help, dir  (0) 2023.01.26
Comments