visNetwork (version 0.1.1)

visPhysics: Network visualization Physics options


Network visualization Physics options. For full documentation, have a look at visDocumentation.


visPhysics(graph, solver = NULL, maxVelocity = NULL, minVelocity = NULL,
  timestep = NULL, barnesHut = NULL, forceAtlas2Based = NULL,
  repulsion = NULL, hierarchicalRepulsion = NULL, stabilization = NULL,
  adaptiveTimestep = NULL)


: a visNetwork object
: String. Default to 'barnesHut'. You can select your own solver. Possible options: 'barnesHut', 'repulsion', 'hierarchicalRepulsion', 'forceAtlas2Based'. When setting the hierarchical layout, the hierarchical repulsion solver is automaticaly selected,
: Number. Default to 50. The physics module limits the maximum velocity of the nodes to increase the time to stabilization. This is the maximium value.
: Number. Default to 0.1. Once the minimum velocity is reached for all nodes, we assume the network has been stabilized and the simulation stops.
: Number. Default to 0.5. The physics simulation is discrete. This means we take a step in time, calculate the forces, move the nodes and take another step. If you increase this number the steps will be too large and the network can get unstable. If you s
named list of options
  • "gravitationalConstant"
{ : Number. Default to -2000. Gravity attracts. We like repulsion. So the value is negative. If you want the repulsion to be stronger, decrease the value (so -10000, -50000).} "centra


  • forceAtlas2Based,
  • "centralGravity"
  • "springLength"
  • "springConstant"
  • "damping"
  • "avoidOverlap"
  • repulsion,
  • "centralGravity"
  • "springLength"
  • "springConstant"
  • "damping"
  • hierarchicalRepulsion,
  • "centralGravity"
  • "springLength"
  • "springConstant"
  • "damping"
  • stabilization,
  • "iterations"
  • "updateInterval"
  • "onlyDynamicEdges"
  • "fit"
  • adaptiveTimestep


  • "enabled"

See Also

visNodes for nodes options, visEdges for edges options, visGroups for groups options, visLayout & visHierarchicalLayout for layout, visPhysics for physics, visInteraction for interaction, ...


Run this code
nodes <- data.frame(id = 1:10)
edges <- data.frame(from = round(runif(8)*10), to = round(runif(8)*10))

visNetwork(nodes, edges) %>%
 visPhysics(solver = "repulsion")

visNetwork(nodes, edges) %>%
 visPhysics(solver = "forceAtlas2Based", forceAtlas2Based = list(gravitationalConstant = -10))

visNetwork(nodes, edges) %>%
 visPhysics(stabilization = FALSE)

Run the code above in your browser using DataLab