如果有一个简单的示例(数据见下文),我可以将其可视化如下:
我的问题是,我想使用弹出窗口来显示更多的信息(这在图中不合适)。问题是:我该怎么做?我发现了很多东西,但是我无法使这个示例工作,这可能是由我从未用Java编写的。我也应该说,我不需要花哨的/复杂的3D东西。一个弹出式窗口就能完成任务!
任何帮助都是非常感谢的!
链接:
这是数据
library(ggraph)
library(igraph)
nodes <- c("cool_fun", "mysum", "mydot", "myfun", "stupid_fun")
list_edges <- structure(list(
cool_fun = structure(list(edges = character(0),
weights = numeric(0)),
.Names = c("edges", "weights")),
mysum = structure(list(edges = character(0),
weights = numeric(0)),
.Names = c("edges", "weights")),
mydot = structure(list(edges = character(0),
weights = numeric(0)),
.Names = c("edges", "weights")),
myfun = structure(list(edges = c("mysum", "mydot"),
weights = c(1, 1)),
.Names = c("edges", "weights")),
stupid_fun = structure(list(edges = character(0),
weights = numeric(0)),
.Names = c("edges", "weights"))),
.Names = c("cool_fun", "mysum", "mydot", "myfun", "stupid_fun"))
my_graph <- graph::graphNEL(nodes=nodes, edgeL=list_edges, edgemode = "directed")
plot(my_graph)
发布于 2017-10-18 17:16:59
还有其他软件包可以让您生成网络图。尝试安装和使用visNetwork
包。实际上,他们的主页上有一个例子,可以做你想做的事情。
链接:
http://datastorm-open.github.io/visNetwork/
https://stackoverflow.com/questions/46814383
复制相似问题