Python saving multiple figures into one PDF file,pdf.close()