物理の駅 Physics station by 現役研究者

テクノロジーは共有されてこそ栄える

2019-07-03から1日間の記事一覧

Python+matplotlibで複数ページのPDFファイルに出力する

import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages pdf_path = "test.pdf" pdf = PdfPages(pdf_path) #グラフ生成 fig, ax = plt.subplots() pdf.savefig() #グラフ生成 fig, ax = plt.subplots() pdf.savefig() pdf.c…