changed png('NULL' to pdf(file=NULL