The physics of the network is highly configurable
Using visPhysics() function, you can play with the physics of the network :
choose the
solver
(‘barnesHut’, ‘repulsion’, ‘hierarchicalRepulsion’, ‘forceAtlas2Based’), and set optionscontrol the
stabilization
processus :play with
maxVelocity
andminVelocity
disable stabilization for rendering initial network and see stabilization processes
….
nodes <- data.frame(id = 1:10)
edges <- data.frame(from = round(runif(8)*10), to = round(runif(8)*10))
visNetwork(nodes, edges, height = "500px", width = "100%") %>%
visPhysics(solver = "forceAtlas2Based",
forceAtlas2Based = list(gravitationalConstant = -500))
visNetwork(nodes, edges, height = "500px", width = "100%") %>%
visPhysics(solver = "barnesHut")