我使用 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))
有什么建议我做错了吗?
---
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))
```