1

I am using the following code in R with the gplots package:

pdf("filepath")
plot(graph)
textplot(table, cmar=1)
title("My title")
dev.off()

My goal is to have a 2-page pdf file with the plot on page 1 and the table with a title on page 2. Everything works except the title. When I run just:

textplot(table, cmar=1)
title("My title")

It properly displays what I would expect the output to be.

Thanks

Matt
  • 23
  • 3
  • Have you created other multi-page PDFs before? If not [check out this question](http://stackoverflow.com/questions/1395410/how-to-print-r-graphics-to-multiple-pages-of-a-pdf-and-multiple-pdfs). – Christopher Bottoms Apr 10 '15 at 17:46
  • This code already creates a multi page pdf. The problem is that the title does does not appear above the textplot. – Matt Apr 11 '15 at 23:20
  • Using your code with my own sample data seems to work fine. I see the title. Could you please post some sample data that reproduces that problem? – Christopher Bottoms Apr 13 '15 at 13:45
  • Chistopher, thanks for responding and testing the code. I updated my version of R and then it worked. – Matt Apr 14 '15 at 15:14
  • Nice. I recommend updating your question to mention the version of R and platform (e.g. 64-bit Windows 7, or whatever it is) that you were using. Also, please add some sample data, so that anyone using that version could try running your code. Then add the answer below that updating to version (fill in the blank) was all that was needed for it to work. – Christopher Bottoms Apr 14 '15 at 17:00

0 Answers0