IISPL
Intelligent Information & Signal Procesing Lab.
Dept. of Computer Engineering, Hanbat National University, South Korea
[
로그인
]
Lab. Info.
About
Services
About me
Research
Members
Projects
IRP
Course
LecturelList
Schedule
Student list
Info.
Lecture Board
LabInfo
Membership
Log in
Regist
Modify
Find account
Gallery
Learning Gallery
YJK'S Gallery
Links
Mypage
Sechedule
커뮤니티
게시판전체
Python
Python/TensorFlow
NOTICE
자유게시판
강좌게시판
WEB-PROG
DP 알림판
C.P.
WebSC
SR Board(V)
OS전체
COMPILER
SSE
DSP
Multimedia
C#
Notice
데이터로표현하는세상
CMPLg RPT
방명록
자료모음
LAB Board
Python
제목:
plot 한글, 마이너스깨짐 대처
1305 김윤중
전역 파라메터 세팅
#한글 - 깨짐 방지를 위한 font와 unicode_minus 처리 전역으로 처리
import matplotlib as mpl
import matplotlib.font_manager as fm
nanum=[(f.name, f.fname) for f in fm.fontManager.ttflist if 'Nanum' in f.name]
#[('NanumGothic', 'C:\\Windows\\Fonts\\NanumGothicBold.ttf'), ('NanumGothic', 'C:\\Windows\\Fonts\\NanumGothic.ttf')]
plt.rcParams["font.family"] = nanum[0][0]
mpl.rcParams['axes.unicode_minus'] = False #-깨짐방지
matplotlibrc 파일의 파라메터 수정 (적색)
C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\Lib\site-packages\matplotlib\mpl-data\matplotlibrc
197 .family : NanumGothic
198 t.style : normal
199#font.variant : normal
323 s.spines.top : True
327 .spines.right : True
328 .unicode_minus : False