Store charts in pdf file
import matplotlib.backends.backend_pdf as bpdf
## PREPARE PDF OUTPUT
# path output
path_output_pdf = os.path.join(folder_output,file_output_pdf)
# create object
pdf = bpdf.PdfPages(path_output_pdf)
## SAVE FIGURE
pdf.savefig(fig)
## CLOSE OBJECT
pdf.close()