Reputation: 564
I am trying to insert a figure into R Markdown. I would like to make the figure an entire page and laying flat (landscape).
Here is my code:
# lots of text...
{r pressure, echo=FALSE, fig.cap="Fig. 1: Treatment durations...", out.width = '100%'}
knitr::include_graphics("E:/CZ/Graphs5/Again/Scam_0hrs.png")
# lots of text...
Upvotes: 1
Views: 1117
Reputation: 12430
Assuming you are talking about PDF:
---
output: pdf_document
header-includes:
- \usepackage{lscape}
---
# lots of text...
\begin{landscape}
```{r pressure, echo=FALSE, fig.cap="Fig. 1: Treatment durations...", out.width = '100%'}
plot(pressure)
```
\end{landscape}
# lots of text...
This is the only way I know and it only works with PDFs.
Upvotes: 1