fig = plt.figure() sbplt = fig.add_subplot() sbplt.hist(hoge) fig.savefig( Path('hoge.pdf') ) plt.close()