rmarkdown 图未出现在 pdf 上

问题描述 投票:0回答:1

我使用 rmarkdown 创建一组幻灯片。我使用乳胶

includegraphics
添加了一个图形,它按预期工作。但是,当我添加通过 R 代码生成的图形时,“乳胶”图形消失了。

最小代码示例

---
title: "TITLE"
author: "JS"
subtitle: SUBTITLE
output:
  beamer_presentation: 
    keep_tex: yes
  ioslides_presentation: default
fontsize: 14pt
---



# Example 

\begin{figure}[t]
  \centering
  \includegraphics[scale=0.25]{include_figure}
\end{figure}

---

# Add figure via R code

```{r, message = FALSE, warnings = FALSE, eval = TRUE, echo = TRUE}
plot(rnorm(100))

有什么建议我做错了吗?

latex r-markdown
1个回答
0
投票
---
title: "TITLE"
author: "JS"
subtitle: SUBTITLE
output:
  beamer_presentation: 
    keep_tex: yes
  ioslides_presentation: default
fontsize: 14pt
---



# Example 

\begin{figure}
  \includegraphics[height=4cm]{example-image-duck}
\end{figure}

---

# Add figure via R code

```{r, message = FALSE, warnings = FALSE, eval = TRUE, echo = TRUE}
plot(rnorm(100))
```
© www.soinside.com 2019 - 2024. All rights reserved.