이번에 제2저자로 들어가는 논문 작업하면서 찾아본 것들을 정리해둡니다.
(1) Times New Roman으로 폰트 수정하기
(2) 테두리가 얇으니 좀 더 두껍게 하기
마지막에 label 폰트 크기 조절하는 부분도 있습니다.

#!/usr/bin/env python
from matplotlib import rc
import matplotlib.pyplot as plt
rc('font', family='serif')
rc('font', serif='Times New Roman')
fig = plt.figure()
ax1 = fig.add_subplot(111)
thickness = 3
frame = ax1.get_frame()
[i.set_linewidth(thickness) for i in ax1.spines.itervalues()]
for label in ax1.get_xticklabels() + ax1.get_yticklabels():
label.set_fontsize(15)
plt.title('Times New Roman',size=20)
plt.xlabel('x',size=20)
plt.ylabel('y',size=20)
plt.show()
태그 : python, matplotlib
최근 덧글