from matplotlib.backends.backend_pdf import PdfPages
PdfPage = PdfPages('../plots/test.pdf')
fig, ax = plt.subplots(1,1)
ax.plot(x1, y1)
PdfPage.savefig(fig)
plt.close()
fig, ax = plt.subplots(1,1)
ax.plot(x2, y2)
PdfPage.savefig(fig)
plt.close()
PdfPage.close()
matplotlib으로 여러 페이지의 pdf 파일을 만드는 방법.
savefig()를 기준으로 페이지가 나뉜다.