[python] 5. 파이썬 파일 불러올때 설정 (폰트)

 01. 기본셋팅 ( 초기값으로 하는게 좋음. 설정할때마다 바뀜 )

%matplotlib inline
import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns
from IPython.display import set_matplotlib_formats
set_matplotlib_formats("retina")

# 폰트 선명도 조절
mpl.rc("font", family="AppleGothic", size =15)
# 폰트 설정, 사이즈 설정
mpl.rc("axes", unicode_minus=False)
# 마이너스 폰트가 나오는 것을 방지
sns.set_style(style='whitegrid')
# 그래프 스타일 5가지 (darkgrid, whitegrid, dark, white, ticks)


02.  폰트 확인 사항

mpl.font_manager.findSystemFonts(fontpaths=None)
# 설치된 폰트 리스트 확인
mpl.rcParams
# 세부적인 디폴트 값을 보여주는데 세부적으로 설정 가능


03. matplotlib 정보 확인

print ('버전:', mpl.__version__)
print ('설치위치:', mpl.__file__)
print ('설정위치:', mpl.get_configdir())
print ('캐시위치:', mpl.get_cachedir())



댓글

이 블로그의 인기 게시물

[python] 1. 파이썬 라이브러리 설치 및 버전확인

[python] 4. 파이썬 파일 불러올때 설정 (데이터양, 인덱스 설정)

[파이썬 실습] 랜덤 타자 게임 만들기 - while, random, time