Factored out pdfgraph