6

I created a network graph using the visNetwork package (I have little knowledge of other languages, sorry).

I want two points (Please look at the left below image)

  1. To make labels bold.
  2. To increase space between labels and border.

Can I do them with R?

Any help would be greatly appreciated. Below is an example code and the outputs:

library(dplyr); library(visNetwork)

visNetwork(nodes = data_frame(id = 1:3, 
                              label = c("abcdef", "xxx", "y"),
                              shape = "box"),
           edges = data_frame(from = c(1, 1, 2),
                              to = c(2, 3, 3),
                              arrows = "to")) %>% 
  visNodes(font = list(size = 17),
           color = list(background = "aliceblue", border = "darkblue")) %>% 
  visEdges(width = 2) %>% 
  visIgraphLayout(layout = "layout_nicely")

enter image description hereenter image description here

cuttlefish44
  • 6,586
  • 2
  • 17
  • 34

0 Answers0