R Markdown:将图形放在单独的页面上,并具有横向定位



我正在尝试在R Markdown中插入一个图形。我想使图形成为一整页并平放(横向(。

这是我的代码:

# 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...

假设您正在谈论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...

这是我所知道的唯一方法,它仅适用于 PDF。

最新更新