changed Plot output from png to pdf.