自動的に送信されるレポートがあり、matplotlib を使用してそれを実行しています。しかし、実行される分析の種類について、タイトルの途中に空白のページを作成する方法を理解できません
with PdfPages('review_count.pdf') as pdf:
for cat in self.cat_vars.keys():
if len(self.cat_vars[cat]) > 1:
plt.figure()
self.cat_vars[cat].plot(kind='bar')
plt.title(cat)
# saves the current figure into a pdf page
pdf.savefig()
plt.close()