当我渲染下面的示例 Rmd 时,它看起来像这样(使用 Chrome,与 Firefox 没有真正的区别):
这个数字太小了,如果我查看我需要的“真实”图,高度太小,高宽比更差。
这是一个可重现的示例:
---
title: "Untitled"
author: "author"
date: "9 Mai 2018"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Example
Here is a line of text...................................................................................................................................................................................................................................................................
```{r echo=FALSE}
require(visNetwork, quietly = TRUE)
# minimal example
nodes <- data.frame(id = 1:20)
edges <- data.frame(from = sample(c(1:20), 10), to = sample(c(1:20), 10))
visNetwork(nodes, edges, width = "100%", height = "100%") %>%
visNodes() %>%
visOptions(highlightNearest = TRUE) %>%
visInteraction(navigationButtons = TRUE,
dragNodes = FALSE,
dragView = FALSE, zoomView = FALSE) %>%
visEdges(arrows = 'to')
```
Here is another line of text....................................................................................................................................................................................................................................................................