page sizes and plots

19 views
Skip to first unread message

James Kitson

unread,
May 15, 2016, 1:43:34 PM5/15/16
to knitr
Hi all,

I'm not even sure if this is a knitr or a straightforward Latex question but here goes. I'm trying to insert a very large figure into a pdf generated using knitr in Rstudio. For legibility I'd like to make the page with the figure larger than the rest. I've tried using \eject to change page size with something like this:

\eject \pdfpagewidth=20in \pdfpageheight=20in
```{r fig.height=19, fig.width=19}
plot(cars)
```

This just results in a small figure (as if I didn't specify fig.height or fig.width at all) on a square 20in page. I've also tried using \includepdf from pdfpages as below to just insert a pdf figure previously generated:

pdf("test.pdf", width=19, height=19)
plot(cars)
dev.off()

\includepdf{test.pdf}

This results in an appropriately sized page but with a figure so small I can barely discern it. I'm guessing this is probably quite simple to fix but I'm tearing my hair out here.

Any ideas?

James
Reply all
Reply to author
Forward
0 new messages