create the file copytopdf.r

This has the sample code to create and copy the plots to the pdf format.