saves figure to pdf