modified plot_pdf to add more options