Followed the docs from matplotlib, https://matplotlib.org/stable/gallery/misc/multipage_pdf.html, to produce a single PDF. Do not ask me how to make the pages to have the same size, as I have no idea
Had to remove some if/elses, change the return type. Tests are passing, but I think I changed more than necessary. Will try to simplify a bit.