saves figures to a pdf.