plotting figure into pdf