小编Fil*_*ota的帖子

如何在 Xaringan 演示文稿中调整图像大小?

我正在尝试从 ioslide 切换到 xaringan。我无法正确调整 ggplot 图像的大小以制作全屏或至少占用尽可能多的空间。我同时使用fig.height/widthout.height/width参数,但只有一个维度改变。有更好的方法来调整图像大小吗?这是设置:

---
title: ""
author: ""
institute: ""
date: "`r Sys.Date()`"
output:
  xaringan::moon_reader:
    lib_dir: libs
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
      ratio: 16:9
---
#```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
knitr::opts_chunk$set(fig.retina=2)

library(Cairo)
library(cairoDevice)
library(tidyverse)
library(kableExtra)
#```

--- 

# Plot

#```{r echo=FALSE, out.height=450, out.width= 2000}
knitr::include_graphics("img/Rplot01.svg")
#```

Run Code Online (Sandbox Code Playgroud)

这是结果: 在此处输入图片说明

我想尽可能地扩大图像

html css r r-markdown xaringan

8
推荐指数
1
解决办法
4147
查看次数

标签 统计

css ×1

html ×1

r ×1

r-markdown ×1

xaringan ×1