在 Rmarkdown ioslides 中对齐和调整 mapview window 的大小
Align and size mapview window in Rmarkdown ioslides
我正在尝试在 Rmarkdown ioslides 演示文稿中从 mapview 居中和调整交互式地图 window 的大小 - 到目前为止没有运气。一个简单的例子:
---
title: "Untitled"
author: ""
date: ""
output: ioslides_presentation
---
## Slide 2
```{r echo=F, message=F, warning=FALSE, fig.align='center'}
library(sf)
library(mapview)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
mapview(nc)
```
我想我需要对文档应用顶级 css 样式自定义,但我不太确定如何去做 - 非常感谢任何建议。
要居中,请在代码块的上方和下方添加中心标记。然后使用 fig.width
和 fig.height
参数调整大小。
## Slide 2
<center>
```{r echo=F, message=F, warning=FALSE, fig.width=4}
library(sf)
library(mapview)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
mapview(nc)
```
</center>
我正在尝试在 Rmarkdown ioslides 演示文稿中从 mapview 居中和调整交互式地图 window 的大小 - 到目前为止没有运气。一个简单的例子:
---
title: "Untitled"
author: ""
date: ""
output: ioslides_presentation
---
## Slide 2
```{r echo=F, message=F, warning=FALSE, fig.align='center'}
library(sf)
library(mapview)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
mapview(nc)
```
我想我需要对文档应用顶级 css 样式自定义,但我不太确定如何去做 - 非常感谢任何建议。
要居中,请在代码块的上方和下方添加中心标记。然后使用 fig.width
和 fig.height
参数调整大小。
## Slide 2
<center>
```{r echo=F, message=F, warning=FALSE, fig.width=4}
library(sf)
library(mapview)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
mapview(nc)
```
</center>