2021-12-21

DiagrammeR and MathJax do not correctly render a graph in a rmarkdown document

I am using the following rmarkdown example, which does not show the symbol theta nor the caption of the figure, and the first node is too wide (see below the output):

---
title: "Untitled"
output: html_document
---

The example is:

```{r nnet02, echo=F, fig.cap="Multilayer"}
library(DiagrammeR)

add_mathjax(
grViz("digraph G1 {
  graph [layout=neato overlap = true]     
  I1 [pos='1,1!'    style=radial label='$\\\\theta$']
  I2 [pos='2,1!'    style=radial]

  I1 -> I2
}", width = 550))
```

enter image description here

Could you please help me?



from Recent Questions - Stack Overflow https://ift.tt/3qhQ877
https://ift.tt/3J5bsoS

No comments:

Post a Comment