我使用visNetwork
包创建了一个网络图(抱歉,我对其他语言不了解)。
我要两点(请看图片下方的左图)
我可以用R做它们吗?
任何帮助将不胜感激。下面是示例代码和输出:
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")