plot and save to pdf