Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201977

How to solve DiagrammeR waste of space issue in rmarkdown?

$
0
0

In RMarkdown, when I insert a flowchart created with package DiagrammeR it turns out that there is a lot of empty space around the chart (above and below). How can I get rid of that empty space, please?

I tried fig.height as a chunk option but it does not help.

---
title: "Untitled"
output:
  pdf_document: default
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## A flowchart

Some explaining text.

```{r echo = FALSE, message=FALSE, warning=FALSE}
library(DiagrammeR)
DiagrammeR("
           graph LR
           A-->B
           A-->C
           C-->E
           B-->D
           C-->D
           D-->F
           E-->F
           ")
```
More explaining text.

Viewing all articles
Browse latest Browse all 201977

Trending Articles