In this recipe, we will learn how to create a PDF document with multiple pages containing a number of figures. This will be handy if you have to create a bunch of reports for a specific user or department and ship it as one single document.
Creating multi-page PDF reports
Getting ready
We will create three figures with two plots each, and place each figure in one page of the PDF document.
Let's import the required libraries:
import datetime
import numpy as np
import pandas as pd
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
import calendar