R d3网络图-停止动画

时间:2019-02-15 15:24:08

标签: r performance d3.js

我已经使用d3库绘制了网络图,但是随着节点数量的增加,动画会带来巨大的性能损失。对于分析,我不需要良好的用户界面,但需要快速

问题:如何停止实时仿真并仍然启用图形操作?

工作代码示例

require(igraph)
require(networkD3)

# Use igraph to make the graph and find membership
karate <- make_graph("Zachary")
wc <- cluster_walktrap(karate)
members <- membership(wc)

# Convert to object suitable for networkD3
karate_d3 <- igraph_to_networkD3(karate, group = members)

# Create force directed network plot
forceNetwork(Links = karate_d3$links, Nodes = karate_d3$nodes,
             Source = 'source', Target = 'target', NodeID = 'name',
             Group = 'group')

视觉输出:

enter image description here

0 个答案:

没有答案